Datguy5
Senior Member
Posts: 629
Threads: 25
Joined: Dec 2011
Reputation:
12
|
RE: Multiple scripts in one map.
(12-21-2011, 08:21 PM)stokesie95 Wrote: what you need to do is to put it like this
////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "key_1", "door1", "KeyOnDoor", true);
SetEntityCallbackFunc("key_1", "OnPickup");
AddEntityCollideCallback("Player", "ScriptArea_1", "Woho", true, 1);
}
void Woho(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("statue's_name", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1", false, true);
PlaySoundAtEntity("", "unlock_door", "door1", 0, false);
RemoveItem("key_1");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("grunt_1", true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Ohh so does that make the statue appear?Thank you!Now if i only would know how to put multiple scripts into one map
EDIT:Yes it works!Thank you mister.But how do you add a sound when it appears.I was planning to add scream or some sort of wind soundeffect.
(This post was last modified: 12-21-2011, 09:16 PM by Datguy5.)
|
|
12-21-2011, 09:12 PM |
|