Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help New Checkpoint problem second Checkpoint
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#11
RE: How do you make Check points?(still help needed)

(06-28-2012, 03:29 PM)FastHunteR Wrote: I tried it out and this one should work:
place a script area for when you should make a checkpoint, and place a PlayerStartArea where you want to spawn after you died.
.hps file:
PHP Code: (Select All)
void OnStart()
{
AddEntityCollideCallback("Player""ScriptAreaNameHere""CheckpointMaker"true1);
}
void CheckpointMaker(string &in asParentstring &in asChildint alState)
{
 
CheckPoint ("""PlayerStartAreaNameHere""""CategoryNameHere""EntrynameHere");

.lang file:
<LANGUAGE>
<CATEGORY Name="CategoryNameHere">
<Entry Name="EntryNameHere">DeathMessageHere</Entry>
</CATEGORY>
</LANGUAGE>

Replace all "...NameHere" with the ones you used in the level editor/want to use.
This sounds stupid but it workedthanks but now I made a second one Adn when I die I do get the other message but I don't get at the second respwan point any ideas?
06-28-2012, 09:08 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#12
RE: New Checkpoint problem second Checkpoint

the checkpoint command for the second checkpoint must have something wrong then. make sure it's a new playerStartArea.
06-28-2012, 09:15 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#13
RE: New Checkpoint problem second Checkpoint

All checkpoint names must be unique in order to issue multiple checkpoints.

Tutorials: From Noob to Pro
06-29-2012, 03:30 AM
Website Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#14
RE: New Checkpoint problem second Checkpoint

PHP Code: (Select All)
void OnEnter()
{
 
AddEntityCollideCallback("Player""CP""CheckpointMaker"true1);
 
AddEntityCollideCallback("Player""AreaTwo""Two"true1);
void CheckpointMaker(string &in asParentstring &in asChildint alState)
{
 
CheckPoint ("""RA""""RespawnDeath""Respawne");
void Two(string &in asParentstring &in asChildint alState)
{
 
CheckPoint ("""WQ""""Death""Deaths");

This is the code of my check points I've checked the names they are like what there stands there.(bad english :S)
The text does seem to work so I have no idea what's wrong.
does anybody might know something?
06-29-2012, 02:34 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#15
RE: New Checkpoint problem second Checkpoint

the first string at a checkpoint command is for the name of that checkpoint. What YC said is to difference them by their names(I myself didn't know that). And at your code you got both checkpoints called "". So change the first option at both, name it like "FirstCheckpoint" and "SecondCheckpoint" or something, whatever you want.
06-29-2012, 02:44 PM
Find
Steve Offline
Member

Posts: 178
Threads: 17
Joined: Jun 2012
Reputation: 7
#16
RE: New Checkpoint problem second Checkpoint

(06-29-2012, 02:44 PM)FastHunteR Wrote: the first string at a checkpoint command is for the name of that checkpoint. What YC said is to difference them by their names(I myself didn't know that). And at your code you got both checkpoints called "". So change the first option at both, name it like "FirstCheckpoint" and "SecondCheckpoint" or something, whatever you want.
It worked thanks a lot. now I only have to make that when if you respawn at the second checkpoint the monster is there again and walks through my pathnodes.
I think I can handle that my self, but a little example would be appreciated. Big Grin
06-29-2012, 03:00 PM
Find
Cruzore Offline
Senior Member

Posts: 301
Threads: 2
Joined: Jun 2012
Reputation: 37
#17
RE: New Checkpoint problem second Checkpoint

the third string at CheckPoint is:
asCallback - the function to call when the player dies/respawns
so, you just make a new function, let it get called when the player dies/respawns, and inside that new function make the grunt appear again and add the pathnodes.
For him appearing again, you could try using
CreateEntityAtArea(string& asEntityName, string& asEntityFile, string& asAreaName, bool abFullGameSave);
to create an enemy again. Even though they do not chase properly along Pathnodes, you could still try.
06-29-2012, 03:22 PM
Find




Users browsing this thread: 1 Guest(s)