ObsidianLegion
Member
Posts: 173
Threads: 53
Joined: Jun 2011
Reputation:
0
|
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);
}
"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
|
|
08-25-2011, 08:27 PM |
|
GreyFox
Member
Posts: 162
Threads: 23
Joined: Jul 2011
Reputation:
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 |
|
ObsidianLegion
Member
Posts: 173
Threads: 53
Joined: Jun 2011
Reputation:
0
|
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
"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
|
|
08-25-2011, 10:07 PM |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
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 |
|
Patacorow
Member
Posts: 135
Threads: 11
Joined: Jul 2011
Reputation:
3
|
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 |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
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 |
|
GraphicsKid
Senior Member
Posts: 258
Threads: 34
Joined: Dec 2010
Reputation:
3
|
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 |
|
ObsidianLegion
Member
Posts: 173
Threads: 53
Joined: Jun 2011
Reputation:
0
|
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 (:
"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
|
|
08-26-2011, 12:30 PM |
|
|