Jump to content
Sign in to follow this  
Persian MO

How it work for both sides (bases protect)

Recommended Posts

Hello there!

happy new year

I have a trigger and a game logic for base protect against noobs.

Game logic

safezone = { _obj = _this select 0;thislist = _this select 1; _obj allowdamage false; waituntil {!(_obj in thislist)}; hint "out from safezone"; _obj allowdamage true;};

Trigger:

trigger cover base area.

50X50,anybody,present,repeatably

condition:true

act:

{[_x,thislist] spawn safezone} foreach thisList

and add

this allowdamage false

to players init.

problem is it work just for one side.

How i change this to work for both sides in PVP ?

Edited by Persian MO

Share this post


Link to post
Share on other sites

I don't do any MP stuff so I'll just say what I notice.

Trigger:

trigger cover base area.

50X50,anybody,present,repeatably

condition:true

The trigger won't repeat as long as condition:true doesn't change.

In effect the trigger goes off once only, you need to force a condition change

cond

this and round (time %1)==1

The trigger is checked every second for new or leaving troops.

It works in SP but I wouldn't count on it working in MP.

Share this post


Link to post
Share on other sites

Put a logic named logic1 onto the map and this in your init.sqs/f:

_shield1 = "ProtectionZone_Ep1" createVehicleLocal (position logic1);
_shield1 setvectorup [0,0,1]
_shield1 setObjectTexture [0,""];

I think, even with createvehicle they are created locally only. You might have to test.

The third line makes it invisible. Otherwise it's a red tube (visible only from outside) with a diameter of 50m.

Within this zone everybody is invulnurable and nobody can kill anybody inside and outside (might be fairer than being immortal but being able to kill others outside).

Additionaly you can mark the safezone on the map:

_m1 = createMarkerLocal ["shieldmarker1", position logic1];
"shieldmarker1" setMarkerColorLocal "ColorRed";
"shieldmarker1" setMarkerBrushLocal "BORDER";
"shieldmarker1" setMarkerShapeLocal "ELLIPSE";
"shieldmarker1" setMarkerSizeLocal [25,25];

Further, you can place triggers exactly on the position(s) of the shields/it's logics that kill everybody of an unwanted side:

To protect the west safe zone:

axis 25 and 25
east present
repeatedly
{if ((side _x) == east) then {_x setDamage 1.0}} forEach thislist;

Otherwise people from an hostile side might enter this area and stay there forever (though not being able to kill anybody).

For the init.sqs/f:

spawntriggereast setpos (position logic1);

Edited by RogueTrooper

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×