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
Multiple use of a void OnStart, need help D:
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#5
RE: Multiple use of a void OnStart, need help D:

void OnStart()

{
AddUseItemCallback("", "key_1", "locked_door1", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("key_1", "OnPickup");
AddEntityCollideCallback("Player", "Message_1", "Message1", true, 1);

}

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

void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("monster_grunt", true);
ShowEnemyPlayerPosition("monster_grunt");
}

void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "popuptext1", 5);
}

void OnEnter()
{
}

void OnLeave()
{
}

That should do it.

Ba-da bing, ba-da boom.
06-09-2012, 11:04 PM
Find


Messages In This Thread
RE: Multiple use of a void OnStart, need help D: - by JenniferOrange - 06-09-2012, 11:04 PM



Users browsing this thread: 2 Guest(s)