Steve
Member
Posts: 178
Threads: 17
Joined: Jun 2012
Reputation:
7
|
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:
void OnStart() { AddEntityCollideCallback("Player", "ScriptAreaNameHere", "CheckpointMaker", true, 1); } void CheckpointMaker(string &in asParent, string &in asChild, int 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 |
|
Cruzore
Senior Member
Posts: 301
Threads: 2
Joined: Jun 2012
Reputation:
37
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
RE: New Checkpoint problem second Checkpoint
All checkpoint names must be unique in order to issue multiple checkpoints.
|
|
06-29-2012, 03:30 AM |
|
Steve
Member
Posts: 178
Threads: 17
Joined: Jun 2012
Reputation:
7
|
RE: New Checkpoint problem second Checkpoint
void OnEnter() { AddEntityCollideCallback("Player", "CP", "CheckpointMaker", true, 1); AddEntityCollideCallback("Player", "AreaTwo", "Two", true, 1); } void CheckpointMaker(string &in asParent, string &in asChild, int alState) { CheckPoint ("", "RA", "", "RespawnDeath", "Respawne"); } void Two(string &in asParent, string &in asChild, int 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 |
|
Cruzore
Senior Member
Posts: 301
Threads: 2
Joined: Jun 2012
Reputation:
37
|
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 |
|
Steve
Member
Posts: 178
Threads: 17
Joined: Jun 2012
Reputation:
7
|
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.
|
|
06-29-2012, 03:00 PM |
|
Cruzore
Senior Member
Posts: 301
Threads: 2
Joined: Jun 2012
Reputation:
37
|
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 |
|
|