Ok still new at scripting lol, you lost me there. Set the trigger something like this
NoWeaponTrigger.sqf
_trgobj = createTrigger ["EmptyDetector", [4601.6831,339,10323.554]];
_trgobj setTriggerActivation ["WEST", "PRESENT", true];
_trgobj setTriggerArea [850, 550, 58.9088, true];
_trgobj setTriggerTimeout [0, 0, 0, true ];
_trgobj setTriggerStatements ["this", "NoWeapon = [] execVM ""data\scripts\NoWeapon.sqf""",""];
_trgobj1 = createTrigger ["EmptyDetector", [4601.6831,339,10323.554]];
_trgobj1 setTriggerActivation ["WEST", "NOT PRESENT", true];
_trgobj1 setTriggerArea [855, 555, 58.9088, true];
_trgobj1 setTriggerTimeout [0, 0, 0, true ];
_trgobj1 setTriggerStatements ["this", "NoWeapon1 = [] execVM ""data\scripts\NoWeapon1.sqf""",""];
not sure about the angle part
NoWeapon.sqf
if (vehicle player in list NoWeapon) then {
for [{_loop=0}, {_loop<1}, {_loop=_loop}] do
{
removeallweapons player;
};
};
NoWeapon1.sqf
terminate NoWeapon;
NoWeapon trigger on map
position[]={4436.8638,-13.339605,1911.1981};
interruptable=1;
age="UNKNOWN";
name="NoWeaponTrigger";
expCond="local player";
expActiv="NoWeapon = thislist; {NoWeapon = [] execVM ""data\scripts\NoWeaponTrigger.sqf""} foreach NoWeapon;";
OK that did not work, so I will have to wait untill you come back on and reply.
I followed this page like it says
http://community.bistudio.com/wiki/Triggers#ScriptingRESOLVED:
This is what we ended up with.
marker on the map, rectangle, solid: NoWeaponZone
Object on the map ( anything ), Initialization:
NoWeapon = [] execVm "NoWeapon.sqf"; this addEventHandler ["HandleDamage", {false}];
NoWeapon.sqf:
for [{_loop=0}, {_loop<1}, {_loop=_loop}] do
{
deletevehicle _trgairport;
_trgairport = createTrigger ["EmptyDetector", (getmarkerPos "NoWeaponZone")];
_trgairport setTriggerArea [850, 350, 58.9088, true];
_trgairport setTriggerActivation ["WEST", "PRESENT", true];
_trgairport setTriggerStatements ["true", "airportzone=thislist; {removeallweapons _x} foreach airportzone;", ""];
sleep 2;
};
We tried it with out the loop, but it would not work.
we tried it execVM from the init.sqf, it would not work.
If player 1 enters the zone he loses his weapons, if player 2 enters the zone while player 1 is still in the zone he loses his weapons too. if player 1 leaves the zone he can rearm at any ammo crate, even if player 2 is still in the zone.
As I said we did try it with out the loop and called from the Init.sqf to no avail. Then I remembered something I had trouble with in arma 1 once, same thing kind-a. tried calling this one script from a trigger and from the init.sqf and never could get it working, then added an object to the map and called it from that initialization and it worked prefect. Never understood that one. Again resolved and Thank you very much for your help. Lol, it even removes all weapons from the ai's.