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
this is a n00b question!
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#4
RE: this is a n00b question!

Lots of mistakes - Try this

void OnStart()
{
AddUseItemCallback("", "DoorKey_1", "Door_3", "UseKeyOnDoor", true);
AddEntityCollideCallback("Player", "doorslam_1","Collidedoorslam", true, -1);
AddEntityCollideCallback("Player", "Unlock_1","Room2Unlock", true, 1);
}


void OnEnter() // Im not sure what your trying to do here, so i cant really troubleshoot it.
{
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}
}

void OnLeave()
{
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_3", false, true);
PlaySoundAtEntity("", "unlock_door", "Player", 0, false);
RemoveItem("DoorKey_1");
}

void Collidedoorslam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("Room_2", true, true);
PlaySoundAtEntity("", "amb_hunt01", "Player", 0, false);
}

void Room2Unlock(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorLocked("Room_2", true, true);
PlaySoundAtEntity("", "unlock_door", "Player", 0, false);
}

If that doesnt work, its likely a typo i missed, a syntax error, or whatever the hell you were trying to do in OnEnter
(This post was last modified: 12-02-2010, 04:01 AM by Chilton.)
12-02-2010, 04:00 AM
Find


Messages In This Thread
this is a n00b question! - by Padster - 12-02-2010, 03:43 AM
RE: this is a n00b question! - by Chilton - 12-02-2010, 03:46 AM
RE: this is a n00b question! - by Padster - 12-02-2010, 03:55 AM
RE: this is a n00b question! - by Chilton - 12-02-2010, 04:00 AM
RE: this is a n00b question! - by Padster - 12-02-2010, 04:07 AM
RE: this is a n00b question! - by Chilton - 12-02-2010, 04:15 AM
RE: this is a n00b question! - by Padster - 12-02-2010, 04:23 AM
RE: this is a n00b question! - by Chilton - 12-02-2010, 04:24 AM



Users browsing this thread: 1 Guest(s)