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
i feel like a newb. help me quick so i can regain self-esteem
SLAMnesia Offline
Member

Posts: 99
Threads: 39
Joined: May 2011
Reputation: 0
#1
Rainbow  i feel like a newb. help me quick so i can regain self-esteem

Quote:////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "key_1", "mansion_1", "UsedKeyOnDoor", true);
}

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

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
here is my entire script, a basic key-unlock-door script and I'm having problems. If the script is perfect and its something in the editor I need to fix lemme know Big Grin i feel so like a nubcake posting this
05-23-2011, 06:14 AM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#2
RE: i feel like a newb. help me quick so i can regain self-esteem

The key you're trying to use needs to be called exactly like in the script:key_1 and the door: mansion_1. Script looks fine while skimmed over
05-23-2011, 06:54 AM
Find
SLAMnesia Offline
Member

Posts: 99
Threads: 39
Joined: May 2011
Reputation: 0
#3
RE: i feel like a newb. help me quick so i can regain self-esteem

ah sweet thanks!
the names were all correct but while intensively looking for mistakes i realized I named the .hps file after the wrong level >.> but you helped me find that thanks man
05-23-2011, 07:02 AM
Find




Users browsing this thread: 2 Guest(s)