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
Key Script?
Jordo76 Offline
Member

Posts: 57
Threads: 7
Joined: Sep 2010
Reputation: 0
#10
RE: Key Script?

Door are Simple,All you need is a Door (Of course),a key (Big Grin) and a .hps

To open a door with a key,it's simple,name the door first,we'll name it "door_1" and the key "key_1"
Set the Door to Locked
Go to the hps file,open it and type :
void UseKey(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);

RemoveItem(asItem);
}


void OnStart()
{

AddUseItemCallback("useexit", "key_1", "door_1", "UseKey",true);

}

And you're all set !
You can add everything in void Onstart() for example :
GiveItemFromFile("lantern", "lantern.ent");
For giving a lantern to the players,etc...
Yes i used the script of the 30 min editor map,
I hope you will do a great map !

PS : If my english is bad it's because i'm french ^^
09-15-2010, 02:31 PM
Website Find


Messages In This Thread
Key Script? - by theDARKW0LF - 09-15-2010, 06:37 AM
RE: Key Script? - by jens - 09-15-2010, 06:56 AM
RE: Key Script? - by theDARKW0LF - 09-15-2010, 06:59 AM
RE: Key Script? - by grahfcard - 09-15-2010, 01:46 PM
RE: Key Script? - by DrMelon - 09-15-2010, 01:49 PM
RE: Key Script? - by jens - 09-15-2010, 01:57 PM
RE: Key Script? - by jens - 09-15-2010, 01:58 PM
RE: Key Script? - by thePyro13 - 09-15-2010, 01:59 PM
RE: Key Script? - by sacroid - 09-15-2010, 02:04 PM
RE: Key Script? - by Jordo76 - 09-15-2010, 02:31 PM
RE: Key Script? - by theDARKW0LF - 09-15-2010, 10:05 PM
RE: Key Script? - by jens - 09-15-2010, 02:33 PM
RE: Key Script? - by sacroid - 09-15-2010, 02:55 PM
RE: Key Script? - by grahfcard - 09-15-2010, 02:50 PM
RE: Key Script? - by sacroid - 09-15-2010, 11:14 PM
RE: Key Script? - by theDARKW0LF - 09-16-2010, 12:43 AM
RE: Key Script? - by Neurological - 09-16-2010, 12:46 AM
RE: Key Script? - by theDARKW0LF - 09-16-2010, 01:03 AM
RE: Key Script? - by Neurological - 09-16-2010, 01:20 AM
RE: Key Script? - by theDARKW0LF - 09-16-2010, 01:34 AM
RE: Key Script? - by Neurological - 09-16-2010, 01:37 AM
RE: Key Script? - by Armored Cow - 09-16-2010, 02:23 AM
RE: Key Script? - by jens - 09-16-2010, 05:23 AM
RE: Key Script? - by Armored Cow - 09-17-2010, 05:18 AM
RE: Key Script? - by jens - 09-17-2010, 07:02 AM
RE: Key Script? - by gosseyn - 09-17-2010, 12:46 PM
RE: Key Script? - by jens - 09-17-2010, 01:00 PM
RE: Key Script? - by gosseyn - 09-17-2010, 08:15 PM
RE: Key Script? - by Wafthrudnir - 09-17-2010, 08:32 PM



Users browsing this thread: 1 Guest(s)