06-21-2012, 05:53 PM
Okay, so I've scripted an event, but would like the brute to despawn at the area "brute1stoparea".
I'm sure there's something wrong with my script, I just can't see it.
Here's my relevant script:
I get no errors, but he doesn't deactivate at the area.
I'm sure there's something wrong with my script, I just can't see it.
Here's my relevant script:
PHP Code:
void OnEnter()
{
AddUseItemCallback("", "room101key", "room101", "UsedKeyOnDoor", true);
AddUseItemCallback("", "room100key", "room100", "UsedKeyOnDoor", true);
AddUseItemCallback("", "hollow_needle_1", "padlock_rusty_1", "unlock_prison_section_1", true);
AddEntityCollideCallback("Player", "prison_1swingarea", "func_slam", true, 1);
AddEntityCollideCallback("Player", "intromusic1", "playintromusic1", true, 1);
AddEntityCollideCallback("brute1", "brute1stoparea", "endbrute1", true, 1);
SetEntityPlayerInteractCallback("prison_1", "func_slam", true);
SetEntityCallbackFunc("room100key", "OnPickup");
SetEntityCallbackFunc("NOTETWO", "OnPickup");
}
void endbrute1(string &in asEntity)
{
SetEntityActive("brute1", false);
}
I get no errors, but he doesn't deactivate at the area.
