Hi everybody
so far, this is my first post, with my first real problem. I'm really newbie to UnrealScript
What I want to acomplish is a triggable ZoneInfo subclass. I mean: a ZoneInfo that can be activated/deactivated by a trigger, something like PressureZone but modifiyin gravity, so if you activate the trigger, the ZoneInfo gravity affects the player
This is one of my attemps, it doesnt work at all
/-------------------------------------------------------------
class TriggableZone expands ZoneInfo;
var() bool bZoneEnabled; //Zone is activated or not
function Trigger( actor Other, pawn EventInstigator )
{
if( bZoneEnabled )
{
//If already activated, deactivate!
bZoneEnabled = false;
return;
}
else
{
//Activate the Zone
bZoneEnabled = true;
if (DamagePerSec != 0)
bPainZone = true;
}
}
// When an actor enters this zone.
event ActorEntered( actor Other )
{
if( !bZoneEnabled )
{
//This is what I added (Zhark)
//If the zone is not enabled (trigger-activated), it won't affect anybody
return;
}
else
{
//Proceed as normal ZoneInfo
Super.ActorEntered(Other);
}
}
I know this is a lame question, with a very bad coding.
I really don't know enough of UnrealScript, any suggestion, tip, help will be very appreciated.
Thanks