After player Died restart Map HeLpiE Help - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: After player Died restart Map HeLpiE Help (/thread-7462.html) |
After player Died restart Map HeLpiE Help - vanjavk - 04-18-2011 Okey I was wondering is it possible to make when player dies for map just map to restart, i mean with all scripts, so like restarting game but not to restart game from first map, hope you understand what i'm saying, also if that's not possible i don't know how to make player when dies to spawn on different location so when PLAYER DIES restart Map not whole thing, OR (if that's not possible) To make when player dies spawn on different position RE: After player Died restart Map HeLpiE Help - nkmol - 04-18-2011 i think when you use , void ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound); it will restart the current map whith all the scripts, not 100% sure. u could use like : Code: if (GetPlayerHealth == 0) try to experiment whith this RE: After player Died restart Map HeLpiE Help - vanjavk - 04-18-2011 (04-18-2011, 05:54 PM)nkmol Wrote: i think when you use ,Thanks for resposnse but i got error on line 32 1 (line when If starts) errror with If like it can't start with if? (i never worked with IF before ) RE: After player Died restart Map HeLpiE Help - Dalroc - 04-18-2011 Post your script mate RE: After player Died restart Map HeLpiE Help - vanjavk - 04-19-2011 (04-18-2011, 10:51 PM)Dalroc Wrote: Post your script mate Code: this is some of code.. RE: After player Died restart Map HeLpiE Help - Rownbear - 04-19-2011 Hmm i've tried playing around with the GetPlayerHealth(); but I can't get it to work either RE: After player Died restart Map HeLpiE Help - Dalroc - 04-19-2011 You have to have the If condition inside of a function. EDIT: Also, I suggest you use better names for your functions than "aghagh" or it will just get messy whe nyou start getting a lot of functions. RE: After player Died restart Map HeLpiE Help - vanjavk - 04-19-2011 (04-19-2011, 01:02 PM)Dalroc Wrote: You have to have the If condition inside of a function. uhm how exactly, sorry but i never worked with IF before so i don't know how to set it ( btw that's the only messy name in whole story xD RE: After player Died restart Map HeLpiE Help - nkmol - 04-19-2011 it is the same as a normal command, you could see it as a command in command for now you need the, void callback { //scripting stuff if//your if script { //script for the if } } as an example, in one of my maps i made a simple if script Code: void OnEnter() AND DON'T COPY THIS! xD this is for a lever script, that will set some electric light on if you get a error, first think about what could be the problem and when you can't solve it, ask it here. But first think by yourself (A) RE: After player Died restart Map HeLpiE Help - vanjavk - 04-19-2011 thankssss |