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

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Please with Scripting
Author Message
abe.lloyd Offline
Junior Member

Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #11
RE: Help Please with Scripting
it says cannotuseItem this way
03-31-2012 04:43 PM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #12
RE: Help Please with Scripting
You are not understanding what I am saying.

void OnStart()

{

AddUseItemCallback("", "key_1", "level_celler_1", "UnlockLevelDoor", true);

}


void UnlockLevelDoor(string &in asItem,string &in asEntity)

{

SetLevelDoorLocked(asEntity, false);

RemoveItem(asItem);

}


That's his correct code. But if he puts the function in void OnLeave() (like he did) instead of void OnStart the function won't be linked the the callback in void OnStart.
(03-31-2012 04:43 PM)abe.lloyd Wrote:  it says cannotuseItem this way
If it says cannot use item this way it means you have not saved it or are not naming the things correctly. It works perfectly on my computer.

(This post was last modified: 03-31-2012 04:45 PM by flamez3.)
03-31-2012 04:44 PM
Find all posts by this user Quote this message in a reply
abe.lloyd Offline
Junior Member

Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #13
RE: Help Please with Scripting
il check all the names

Do i have t reaname things then
(This post was last modified: 03-31-2012 05:05 PM by abe.lloyd.)
03-31-2012 04:59 PM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #14
RE: Help Please with Scripting
Rename your key to
key_1 and the door to
level_celler_1

03-31-2012 05:07 PM
Find all posts by this user Quote this message in a reply
abe.lloyd Offline
Junior Member

Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #15
RE: Help Please with Scripting
still saying cannotuseItem this way do i need to change the customitemsubname
04-01-2012 10:16 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #16
RE: Help Please with Scripting
No you don't. Delete any .map_cache's and make sure that you have set up the correct folders for the maps.

04-01-2012 10:25 AM
Find all posts by this user Quote this message in a reply
abe.lloyd Offline
Junior Member

Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #17
RE: Help Please with Scripting
do u have skype
04-01-2012 10:39 AM
Find all posts by this user Quote this message in a reply
Post Reply 




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