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
Scripting Problem
DubbaNinja Offline
Junior Member

Posts: 4
Threads: 3
Joined: Apr 2012
Reputation: 0
#4
RE: Scripting Problem

(04-23-2012, 11:37 PM)JenniferOrange Wrote:
(04-23-2012, 11:08 PM)Cranky Old Man Wrote: How many times did you go over your code while missing this:

***Completely missing function header***
{

AddEntityCollideCallback("Player", "doorslam_1", "Collidedoorslam_1", true, 1);

}
This sir is correct.
Toss AddEntityCollideCallback("Player", "doorslam_1", "Collidedoorslam_1", true, 1); with his buddies up under void OnStart.

void OnStart()
{
AddUseItemCallback("", "studykey_1", "mansiondoor_1", "FUNCTION", true);
AddEntityCollideCallback("Player", "doorslam_1", "Collidedoorslam_1", true, 1);
}

void FUNCTION(string &in item, string &in door)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem("studykey_1");
}

void Collidedoorslam_1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansiondoor_1", true, true);
}
Thanks! It works now Smile

04-24-2012, 05:56 AM
Find


Messages In This Thread
Scripting Problem - by DubbaNinja - 04-23-2012, 09:58 PM
RE: Scripting Problem - by Cranky Old Man - 04-23-2012, 11:08 PM
RE: Scripting Problem - by JenniferOrange - 04-23-2012, 11:37 PM
RE: Scripting Problem - by DubbaNinja - 04-24-2012, 05:56 AM



Users browsing this thread: 1 Guest(s)