Frictional Games Forum (read-only)

Full Version: activating script area
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
void DeactivateMonster(string &in asParent, string &in asChild, int alState)
{
SetScriptAreaActive("Deactivate_grunt_1", true);
}



it basically said SetScriptAreaActive doesnt exist so what would the proper thing to put in be
No, if you search for "SetScriptAreaActive" in the script function list (at http://wiki.frictionalgames.com/hpl2/amn..._functions ) you will find that it doesn't exist, which means that it must be a custom function created in the same hps file that you copied DeactivateMonster() from.
Seriously, you need to learn the basics of scripting instead of asking the forum every time things don't work out for you. YourComputer made a YouTube tutorial. Start with that. Then learn AngelScript and read about script functions on the wiki.

(04-05-2012, 03:19 AM)Cranky Old Man Wrote: [ -> ]No, if you search for "SetScriptAreaActive" in the script function list (at http://wiki.frictionalgames.com/hpl2/amn..._functions ) you will find that it doesn't exist, which means that it must be a custom function created in the same hps file that you copied DeactivateMonster() from.
Seriously, you need to learn the basics of scripting instead of asking the forum every time things don't work out for you. YourComputer made a YouTube tutorial. Start with that. Then learn AngelScript and read about script functions on the wiki.


i know the basics but i just dont know how to set the script area activate
Use SetEntityActive.
In a script you can add or remove script areas.

Adding

{
AddEntityCollideCallBack Thingy
}

Removing.
Shown in post #4