Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i feel like a newb. help me quick so i can regain self-esteem
Author Message
SLAMnesia Offline
Member

Posts: 94
Joined: May 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Roenlond Offline
Senior Member

Posts: 331
Joined: Apr 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
SLAMnesia Offline
Member

Posts: 94
Joined: May 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)