Datguy5
Senior Member
Posts: 629
Threads: 25
Joined: Dec 2011
Reputation:
12
|
RE: Multiple scripts in one map.
(12-29-2011, 07:47 PM)stokesie95 Wrote: sorry it took so long to reply
you would use
////////////////////////////
// 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);
PlaySoundAtEntity("sound name", "file name including the file type eg .ogg", "statue's name", , );
}
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 ok ill give it a try.
EDIT:It didnt work heres the crash report:FATAL ERROR:could not load script file
'custom_stories/Test/custom_stories/Test/maps/Test.hps'!
main(15,63):Err:Expected expression value
(This post was last modified: 12-31-2011, 12:27 AM by Datguy5.)
|
|
12-31-2011, 12:18 AM |
|