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?
jens Offline
Frictional Games

Posts: 4,093
Threads: 199
Joined: Apr 2006
Reputation: 202
#27
RE: Key Script?

"useexit" is only the name of the Callback, so you can do RemoveUseItemCallback("useexit"); and it would not be possible to use the key any longer.

A Callback could also be thought of as a trigger, something that occurs at a specified event, in this case when using a specific key on a specific door.

It is in OnStart because it is something that should be active in the level from the very start and then stay in the back, checking for when its event occurs. So you are correct in your assumption, it is something that "stays in memory waiting to be triggered".

asName = as I explained before.
then the rest are correct except, abAutoDestroy. This is the actual Callback, so false means that you can keep using the key on the door, true is that you can only do it one time, then it will say that you can not use the key on the door. It does not remove the key from the inventory.

Removing of the key is done in the callback, with the line "RemoveItem(asItem);" where asItem references the item used on the door, in this case the key.
09-17-2010, 01:00 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)