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
Little unkown spike in script
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#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);
}

"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
Find
GreyFox Offline
Member

Posts: 162
Threads: 23
Joined: Jul 2011
Reputation: 2
#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
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#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

"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
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#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
Patacorow Offline
Member

Posts: 135
Threads: 11
Joined: Jul 2011
Reputation: 3
#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
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#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
GraphicsKid Offline
Senior Member

Posts: 258
Threads: 34
Joined: Dec 2010
Reputation: 3
#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
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#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 (:

"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
Find




Users browsing this thread: 1 Guest(s)