ApeCake
Member
Posts: 116
Threads: 20
Joined: Jun 2012
Reputation:
4
|
RE: Multiple use of a void OnStart, need help D:
(06-09-2012, 11:04 PM)JenniferOrange Wrote: 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. Thanks Jennifer! It worked. Love your tutorials!
|
|
06-10-2012, 11:22 AM |
|