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
How do i use this script??
danimora2012 Offline
Junior Member

Posts: 47
Threads: 18
Joined: Apr 2012
Reputation: 0
#1
Shocked  How do i use this script??

AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy);

Ok...I want to know how i use this...
asName - internal name
asItem - internal name of the item
asEntity - entity to be able to use the item on
asFunction - function to call
abAutoDestroy - determines whether the item is destroyed when used

But i don't know how to use it...Can you tell me? [Image: tongue.gif]





[Image: lY3ZQAEWKkmltRFfY8M0TQ2.gif]
(This post was last modified: 09-19-2012, 10:29 PM by danimora2012.)
09-19-2012, 10:29 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: How do i use this script??

(09-19-2012, 09:37 PM)danimora2012 Wrote: AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy);

Ok...I want to know how i use this...
asName - internal name
asItem - internal name of the item
asEntity - entity to be able to use the item on
asFunction - function to call
abAutoDestroy - determines whether the item is destroyed when used
asName - Name of the function itself
asItem - Name of the item that is being used (i.e., a key)
asEntity - entity to be able to use the item on (i.e., the door)
asFunction - function to call when you use the item on the entity
abAutoDestroy - determines whether the item is destroyed when used/removed from your inventory


Example (this is a basic "unlock the door with key" script):

void OnStart()
{
AddUseItemCallback("", "key01", "door", "keydoor_func", true);
}

void keydoor_func(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door", false, true);
}
(This post was last modified: 09-19-2012, 10:45 PM by Statyk.)
09-19-2012, 10:44 PM
Find
danimora2012 Offline
Junior Member

Posts: 47
Threads: 18
Joined: Apr 2012
Reputation: 0
#3
RE: How do i use this script??

(09-19-2012, 10:44 PM)Statyk Wrote:
(09-19-2012, 09:37 PM)danimora2012 Wrote: AddUseItemCallback(string& asName, string& asItem, string& asEntity, string& asFunction, bool abAutoDestroy);

Ok...I want to know how i use this...
asName - internal name
asItem - internal name of the item
asEntity - entity to be able to use the item on
asFunction - function to call
abAutoDestroy - determines whether the item is destroyed when used
asName - Name of the function itself
asItem - Name of the item that is being used (i.e., a key)
asEntity - entity to be able to use the item on (i.e., the door)
asFunction - function to call when you use the item on the entity
abAutoDestroy - determines whether the item is destroyed when used/removed from your inventory


Example (this is a basic "unlock the door with key" script):

void OnStart()
{
AddUseItemCallback("", "key01", "door", "keydoor_func", true);
}

void keydoor_func(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door", false, true);
}
Thank you... but i wanted to mix a "chemical" with a "burner" to make an "bomb" to explode "rocks"
09-19-2012, 10:55 PM
Find




Users browsing this thread: 1 Guest(s)