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
Little unkown spike in script
Author Message
JackoIsDeath Offline
Member

Posts: 171
Joined: Jun 2011
Reputation: 0
Post: #1
Little unkown spike in script
Right, so I'm trying to get this key to open a door and all the Scripting names are right. But I have my suspicions about the script. It doesn't crash. It loads the level up, but the callback doesn't work.

void OnStart()
{
SetEntityPlayerInteractCallback("ScareDoor_1", "ScareDoorScript", true);
AddUseItemCallback("" , "Door_1", "Key_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Door_1",  0, false);
}

08-25-2011 08:27 PM
Find all posts by this user Quote this message in a reply
GreyFox Offline
Member

Posts: 162
Joined: Jul 2011
Reputation: 2
Post: #2
RE: Little unkown spike in script
The only thing I noticed was you have a space in between the "" , for AddUseItemCallback("" ,

maybe that'll fix it?

-Grey Fox

Current Project
Forgotten
08-25-2011 09:26 PM
Find all posts by this user Quote this message in a reply
JackoIsDeath Offline
Member

Posts: 171
Joined: Jun 2011
Reputation: 0
Post: #3
RE: Little unkown spike in script
(08-25-2011 09:26 PM)GreyFox Wrote:  The only thing I noticed was you have a space in between the "" , for AddUseItemCallback("" ,

maybe that'll fix it?

-Grey Fox

Maybe. I'll try. Thanks

08-25-2011 10:07 PM
Find all posts by this user Quote this message in a reply
palistov Offline
Posting Freak

Posts: 1,175
Joined: Mar 2011
Reputation: 56
Post: #4
RE: Little unkown spike in script
Looks like your script says to call the function if the door is used on the key. Switch them around.

08-25-2011 10:10 PM
Find all posts by this user Quote this message in a reply
Patacorow Online
Member

Posts: 135
Joined: Jul 2011
Reputation: 3
Post: #5
RE: Little unkown spike in script
(08-25-2011 10:10 PM)palistov Wrote:  Looks like your script says to call the function if the door is used on the key. Switch them around.

Nah, that's cool. The grunt'll just pick up the door for Daniel and ram it up the key.
08-25-2011 10:35 PM
Find all posts by this user Quote this message in a reply
palistov Offline
Posting Freak

Posts: 1,175
Joined: Mar 2011
Reputation: 56
Post: #6
RE: Little unkown spike in script
(08-25-2011 10:35 PM)Patacorow Wrote:  
(08-25-2011 10:10 PM)palistov Wrote:  Looks like your script says to call the function if the door is used on the key. Switch them around.

Nah, that's cool. The grunt'll just pick up the door for Daniel and ram it up the key.

^ lol

08-26-2011 03:57 AM
Find all posts by this user Quote this message in a reply
GraphicsKid Offline
Senior Member

Posts: 255
Joined: Dec 2010
Reputation: 1
Post: #7
RE: Little unkown spike in script
(08-26-2011 03:57 AM)palistov Wrote:  
(08-25-2011 10:35 PM)Patacorow Wrote:  
(08-25-2011 10:10 PM)palistov Wrote:  Looks like your script says to call the function if the door is used on the key. Switch them around.

Nah, that's cool. The grunt'll just pick up the door for Daniel and ram it up the key.

^ lol

thought you weren't going to say key there for a sec.
08-26-2011 04:22 AM
Find all posts by this user Quote this message in a reply
JackoIsDeath Offline
Member

Posts: 171
Joined: Jun 2011
Reputation: 0
Post: #8
RE: Little unkown spike in script
(08-25-2011 10:35 PM)Patacorow Wrote:  
(08-25-2011 10:10 PM)palistov Wrote:  Looks like your script says to call the function if the door is used on the key. Switch them around.

Nah, that's cool. The grunt'll just pick up the door for Daniel and ram it up the key.

XD This made me lol (:

08-26-2011 12:30 PM
Find all posts by this user Quote this message in a reply
Post Reply 




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