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
dont work Scripting a door
Spermaharen Offline
Junior Member

Posts: 8
Threads: 3
Joined: Dec 2011
Reputation: 0
#1
dont work Scripting a door

Hey im trying to scripting a door and my script looks like this !
Have i done something wrong beacuse when i use the key on the door i get a message
The Message goes like this : Cannot use this item this way!
If anyone have a clue please help me!



void OnStart()
{

AddUseItemCallback("", "Key1", "Door", "FUNCTION", true);
}

void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door", false, true);
PlaySoundAtEntity("", "unlock_door", "Door", 0, false);
RemoveItem("Key1");

}


SPERMAHAREN Cool
12-05-2011, 05:55 PM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#2
RE: dont work Scripting a door

I take it that the items inside your map are named "Key1" and "Door"?
12-05-2011, 06:07 PM
Find
Spermaharen Offline
Junior Member

Posts: 8
Threads: 3
Joined: Dec 2011
Reputation: 0
#3
RE: dont work Scripting a door

(12-05-2011, 06:07 PM)i3670 Wrote: I take it that the items inside your map are named "Key1" and "Door"?
Name on Door : Door
CustomSubItemTypeName : Key1
12-05-2011, 06:26 PM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#4
RE: dont work Scripting a door

(12-05-2011, 06:26 PM)Spermaharen Wrote:
(12-05-2011, 06:07 PM)i3670 Wrote: I take it that the items inside your map are named "Key1" and "Door"?
Name on Door : Door
CustomSubItemTypeName : Key1

there's your problem. You should type "Key1" in the name box.

12-05-2011, 06:30 PM
Find
Spermaharen Offline
Junior Member

Posts: 8
Threads: 3
Joined: Dec 2011
Reputation: 0
#5
RE: dont work Scripting a door

(12-05-2011, 06:30 PM)i3670 Wrote: Name on Door : DoorCustomSubItemTypeName : Key1
(12-05-2011, 06:26 PM)Spermaharen Wrote: there's your problem. You should type "Key1" in the name box.
OMFG That was lame by me
Thank you so much it helps alot !
(This post was last modified: 12-05-2011, 07:12 PM by Spermaharen.)
12-05-2011, 07:02 PM
Find




Users browsing this thread: 1 Guest(s)