SonOfLiberty796
Senior Member
Posts: 371
Threads: 39
Joined: Aug 2011
Reputation:
2
|
Start event when player spawns at a certain PlayerStartArea?
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.
|
|
10-06-2011, 03:14 AM |
|
GreyFox
Member
Posts: 162
Threads: 23
Joined: Jul 2011
Reputation:
2
|
RE: Start event when player spawns at a certain PlayerStartArea?
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
Current Project
Forgotten
|
|
10-06-2011, 03:36 AM |
|
SonOfLiberty796
Senior Member
Posts: 371
Threads: 39
Joined: Aug 2011
Reputation:
2
|
RE: Start event when player spawns at a certain PlayerStartArea?
(10-06-2011, 03:36 AM)GreyFox Wrote: 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 That looks like it'll work! I'll try it out right now
|
|
10-06-2011, 04:06 AM |
|
Obliviator27
Posting Freak
Posts: 792
Threads: 10
Joined: Jul 2011
Reputation:
66
|
RE: Start event when player spawns at a certain PlayerStartArea?
If you want the player to move areas completely, you can always use
TeleportPlayer(string& asStartPosName);
To get them there.
|
|
10-06-2011, 05:28 AM |
|
SonOfLiberty796
Senior Member
Posts: 371
Threads: 39
Joined: Aug 2011
Reputation:
2
|
RE: Start event when player spawns at a certain PlayerStartArea?
(10-06-2011, 05:28 AM)Obliviator27 Wrote: If you want the player to move areas completely, you can always use
TeleportPlayer(string& asStartPosName);
To get them there. Yeah 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 :/
|
|
10-07-2011, 02:30 AM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Start event when player spawns at a certain PlayerStartArea?
(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."
|
|
10-07-2011, 03:50 AM |
|
SonOfLiberty796
Senior Member
Posts: 371
Threads: 39
Joined: Aug 2011
Reputation:
2
|
RE: Start event when player spawns at a certain PlayerStartArea?
(10-07-2011, 03:50 AM)Your Computer Wrote: (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." When player enters at the desired spot, which is PlayerStartArea_2.
|
|
10-07-2011, 04:31 AM |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: Start event when player spawns at a certain PlayerStartArea?
(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?
|
|
10-07-2011, 05:57 AM |
|
SonOfLiberty796
Senior Member
Posts: 371
Threads: 39
Joined: Aug 2011
Reputation:
2
|
RE: Start event when player spawns at a certain PlayerStartArea?
(10-07-2011, 05:57 AM)Your Computer Wrote: (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? 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-08-2011, 12:37 AM |
|
LowFire3
Junior Member
Posts: 26
Threads: 4
Joined: Dec 2010
Reputation:
1
|
RE: Start event when player spawns at a certain PlayerStartArea?
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.
|
|
10-08-2011, 12:46 AM |
|
|