Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help how to add checkpoints
Author Message
zombiehacker595 Offline
Member

Posts: 141
Joined: Mar 2012
Reputation: 3
Post: #1
how to add checkpoints

so im onto my third map and i am starting to bring in the monster and i was wondering how do i set checkpoints so when if you die you dont go back to the beggining of the map?
04-02-2012 06:53 AM
Find all posts by this user Quote this message in a reply
heyitsrobert97 Offline
Member

Posts: 68
Joined: Jan 2012
Reputation: 0
Post: #2
RE: how to add checkpoints

To Create Checkpoints you add a Script Area to walk into. So Add A Collide Callback on The Box. Create A Player Start area and call it what you want. And Create a Checkpoint Script in the Callback Function.
To add more than one checkpoint, in the first section write 'checkpoint1' and checkpoint 2 and so on.
So Basically,,

{
AddEntityCollideCallback("Player", "spawnareabox", "checkpoint1", true, 1);
}

void checkpoint1(string &in asParent, string &in asChild, int alState)
{
CheckPoint ("checkpoint1", "playerstart_2", "ADD A CALLBACK BUT NOT NEEDED", "DEATH HINT CATEGORY", "DEATH HINT CATEGORY");
}

To add more than 1 checkpoint repeat but change the first box of the checkpoint to 'checkpoint2' and so on.

This Darn House! , Four Doors, Youtube
04-02-2012 07:05 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,283
Joined: Apr 2011
Reputation: 57
Post: #3
RE: how to add checkpoints

(04-02-2012 07:05 AM)heyitsrobert97 Wrote:  To Create Checkpoints you add a Script Area to walk into. So Add A Collide Callback on The Box. Create A Player Start area and call it what you want. And Create a Checkpoint Script in the Callback Function.
To add more than one checkpoint, in the first section write 'checkpoint1' and checkpoint 2 and so on.
So Basically,,

{
AddEntityCollideCallback("Player", "spawnareabox", "checkpoint1", true, 1);
}

void checkpoint1(string &in asParent, string &in asChild, int alState)
{
CheckPoint ("checkpoint1", "playerstart_2", "ADD A CALLBACK BUT NOT NEEDED", "DEATH HINT CATEGORY", "DEATH HINT CATEGORY");
}

To add more than 1 checkpoint repeat but change the first box of the checkpoint to 'checkpoint2' and so on.
Actually it's

CheckPoint ("checkpoint1", "playerstart_2", "ADD A FUNCTION BUT NOT NEEDED", "DEATH HINT CATEGORY", "DEATH HINT ENTRY");
}

04-02-2012 07:25 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)