![]() |
Start event when player spawns at a certain PlayerStartArea? - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Start event when player spawns at a certain PlayerStartArea? (/thread-10624.html) Pages:
1
2
|
Start event when player spawns at a certain PlayerStartArea? - SonOfLiberty796 - 10-06-2011 Like the title says, is there a way where if a player spawns at a certain PlayerStartArea an event happens? (like monsters spawn etc.) What I want to do is when the player spawns at PlayerStartArea_2, monsters spawn at the same time in a different room. RE: Start event when player spawns at a certain PlayerStartArea? - GreyFox - 10-06-2011 Uhh could you use this (bolded part) CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); asName - the internal name asStartPos - the name of the StartPos in the editor asCallback - the function to call when the player dies/respawns asDeathHintCat - the category of the death hint message to be used in the .lang file asDeathHintEntry - the entry in the .lang file and then make the function Checkpoint_2/1 whatever SetEntityActive("", true/false) So On So On I'm not completely sure with checkpoints mainly because in my custom story I haven't added them but. I think that'd work. -Grey Fox RE: Start event when player spawns at a certain PlayerStartArea? - SonOfLiberty796 - 10-06-2011 (10-06-2011, 03:36 AM)GreyFox Wrote: Uhh could you use this (bolded part)That looks like it'll work! I'll try it out right now ![]() RE: Start event when player spawns at a certain PlayerStartArea? - Obliviator27 - 10-06-2011 If you want the player to move areas completely, you can always use TeleportPlayer(string& asStartPosName); To get them there. RE: Start event when player spawns at a certain PlayerStartArea? - SonOfLiberty796 - 10-07-2011 (10-06-2011, 05:28 AM)Obliviator27 Wrote: If you want the player to move areas completely, you can always useYeah I know, but it wasn't what I was looking for. :p Well I tried out what you said Grey Fox, but it didnt work unfortunately :/ RE: Start event when player spawns at a certain PlayerStartArea? - Your Computer - 10-07-2011 (10-07-2011, 02:30 AM)Xvideogamer720X Wrote: Well I tried out what you said Grey Fox, but it didnt work unfortunately :/ In what way? There are only two ways to achieve what you want, and that is either through checkpoints (i.e. after the player dies) or when the player enters at the desired spot (e.g. having previously interacted with a level door); there is no other instance that i know of that the player "spawns." RE: Start event when player spawns at a certain PlayerStartArea? - SonOfLiberty796 - 10-07-2011 (10-07-2011, 03:50 AM)Your Computer Wrote:When player enters at the desired spot, which is PlayerStartArea_2.(10-07-2011, 02:30 AM)Xvideogamer720X Wrote: Well I tried out what you said Grey Fox, but it didnt work unfortunately :/ RE: Start event when player spawns at a certain PlayerStartArea? - Your Computer - 10-07-2011 (10-07-2011, 04:31 AM)Xvideogamer720X Wrote: When player enters at the desired spot, which is PlayerStartArea_2. I meant, what doesn't work? How do you have things set up? RE: Start event when player spawns at a certain PlayerStartArea? - SonOfLiberty796 - 10-08-2011 (10-07-2011, 05:57 AM)Your Computer Wrote:Like when I spawn (on the P.S.A 2 PlayerStartArea_2) nothing happens (but I want monsters to spawn right when the Player spawns on P.S.A 2)(10-07-2011, 04:31 AM)Xvideogamer720X Wrote: When player enters at the desired spot, which is PlayerStartArea_2. RE: Start event when player spawns at a certain PlayerStartArea? - LowFire3 - 10-08-2011 Just make a scripted area where the PlayerStartArea is. So when the player spawns in at PlayerStartArea_2, he will instantly collide with the script area and do whatever you want it to do. That is how I do it if I want something to happen the second I spawn in an area. |