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 Checkpoint help
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#2
RE: Checkpoint help

Try this:
PHP Code: (Select All)
//Create a checkpoint, as you have already, and set the callback function //Function(string &in asName, int alCount)

//For example,

void CheckPointCallback(string &in asNameint alCount)
{
 
//Now, you want the enemy to respawn, the key to be removed from the player's inventory and placed back in its original spot, right?

         
if(HasItem("yourkey"//or GetEntityExists("enemyname"), use whichever works
         
{
          
//You'll probably have to re-add the pickup and collide callbacks

          
SetEntityActive("enemyname",false); //I'm pretty sure the enemy will "remember" its initial spot, so deactivating it here and reactivating it in a callback doesn't matter
          
RemoveItem("yourkey");
          
//Unlock/relock the doors?
          
CreateEntityAtArea("keyname(same one)","file for key +.ent","area to create it at",false); //Spawns another key. I *believe* keeping the
// same name will allow you to use it like the original key

        
}


Hopefully this gives you a general idea. It's pretty rough, but play around with it.

Also, I'm sorry if this fails to answer the problem you were having. My head hurts pretty bad today.



*edit* why is the page stretching? -.-

RAISE YOUR DONGERS ヽ༼ຈل͜ຈ༽ノ
(This post was last modified: 04-25-2013, 03:41 AM by Tomato Cat.)
04-24-2013, 07:16 PM
Find


Messages In This Thread
Checkpoint help - by Dominic0904 - 04-24-2013, 06:01 PM
RE: Checkpoint help - by Tomato Cat - 04-24-2013, 07:16 PM
RE: Checkpoint help - by Dominic0904 - 04-24-2013, 09:01 PM
RE: Checkpoint help - by Tomato Cat - 04-24-2013, 11:08 PM
RE: Checkpoint help - by Dominic0904 - 04-25-2013, 02:13 PM
RE: Checkpoint help - by PutraenusAlivius - 04-25-2013, 02:33 PM
RE: Checkpoint help - by Dominic0904 - 04-25-2013, 03:58 PM
RE: Checkpoint help - by Tomato Cat - 04-25-2013, 02:51 PM
RE: Checkpoint help - by Tomato Cat - 04-25-2013, 04:14 PM
RE: Checkpoint help - by Dominic0904 - 04-25-2013, 04:32 PM
RE: Checkpoint help - by Tomato Cat - 04-25-2013, 05:07 PM
RE: Checkpoint help - by Dominic0904 - 04-25-2013, 06:47 PM
RE: Checkpoint help - by Tomato Cat - 04-25-2013, 08:08 PM
RE: Checkpoint help - by Dominic0904 - 04-25-2013, 09:21 PM
RE: Checkpoint help - by Dominic0904 - 04-27-2013, 06:36 PM
RE: Checkpoint help - by Tomato Cat - 04-27-2013, 07:07 PM



Users browsing this thread: 1 Guest(s)