

wokstation
Member-
Content Count
87 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout wokstation
-
Rank
Corporal
-
Control Structure problem [If and switch]
wokstation replied to wickedstigma's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Couldn't see a getPosASL command in your code - it seems to take exception to whatever you've put in there. -
Forced landing script help
wokstation replied to evans d [16aa]'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Oh I'm not bothered about credit, I'm gratified enough seeing it used. I assume you're using an object created in the editor? Is there a reason (ie, to allow it to die and become unavailable) you're not using the spawnVehicle function? -
Control Structure problem [If and switch]
wokstation replied to wickedstigma's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Not sure about switch, not done much with it, but I can see what's up with the IF statement: if (_ffe = true) Comparisons in IF statements use two equals signs, so (_ffe == true) would be right - except ArmA doesn't seem to like truisms. _ffe contains true/false, so you're asking if true equals true, perfectly valid except not in ArmA it seems. Instead just use the bool condition: if (_ffe) ArmA will then read that as "if TRUE" or "if FALSE" and act accordingly. Might even fix your switch issue. -
Forced landing script help
wokstation replied to evans d [16aa]'s topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Going by some of the parameter names I think he may be adapting one of my landing scripts - in which case the purpose is to separate the pilot from the gunnery crew so the pilot can remain careless/mode-green (so will fly and land regardless of fire) and the gunners still get to fire on targets of opportunity, so defending the helicopter. It's the method I use when creating a vehicle with the BIS functions. -
Helo Landing
wokstation replied to Militant1006's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Give the soldiers a waypoint right next to the invisible helipad, of type "get out", and synchronise it with the helicopter's "transport unload" waypoint (make sure that transport unload waypoint is attached to the helipad for accurate landing). -
setCombatMode problem
wokstation replied to f2k sel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Then just adapt the script I've given you to cover the civilians in the area too - when it removes combatMode "blue" from the soldiers, make it also setCaptive FALSE on the civvies. It'd take you thirty seconds. -
setCombatMode problem
wokstation replied to f2k sel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
_grp1 = _this select 0; _grp1 setcombatmode "blue"; _cnt1 = 0; while {_cnt1 == 0} do { { if ((damage _x) > 0) then {_cnt1 = 1}; } foreach units _grp1; sleep 0.2; }; _grp1 setcombatmode "yellow"; Off the top of my head, that'll make the group passed to the script hold fire utterly until one of them gets hurt, then they get to fire back. -
Cant get addwaypoint working
wokstation replied to rcmw's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
How are you creating the unit and when are you giving it the waypoints? If you're using createUnit, the wiki reckons you need to give it the join command to join it to the group you spawned it to before it'll accept any orders. Also if they're already doing an order, they don't seem to go for the waypoints - giving them a doMove to their current position seems to clear their current orders and make them return to waypoints/formation. There's also no move waypoint there. And are you adding this in an onActivation field in a trigger or something? And what's CASUnit? Is that a unit, or a group? Going by the variable name, I'm guessing it's a unit... in which case, the commands won't work. Try this: way1 = (group CASunit) addWaypoint [position player, 0]; way1 setWaypointType "MOVE"; way1 setWaypointBehaviour "aware"; way1 setWaypointCombatMode "yellow"; way1 setWaypointDescription "CAS Mission position."; way1 setWaypointSpeed "FULL"; way2 = (group CASunit) addWaypoint [position player, 0]; way2 setWaypointBehaviour "COMBAT"; way2 setWaypointCombatMode "RED"; way2 setWaypointDescription "CAS Mission position."; way2 setWaypointFormation "ECH LEFT"; way2 setWaypointSpeed "FULL"; way2 setWaypointType "SAD"; That tells them to go to the SAD area, then to do the SAD. If they still don't move, add this to the end: {_x doMove (getpos _x)} foreach units group CASunit; -
setCombatMode problem
wokstation replied to f2k sel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
setCombatMode "Blue" springs to mind... -
Helo Landing
wokstation replied to Militant1006's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
unAssignVehicle just tells them that vehicle spot isn't theirs anymore. It doesn't tell them it's time to get out. You want doGetOut or commandGetOut for that. -
Simple Artillery Strike v1.0
wokstation replied to wickedstigma's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I believe there are similar for the other modules, but I don't know what they are. I tend to not run any commands on them until a few seconds into the mission to make sure they're running... -
Parachute Ammo Box
wokstation replied to seedo81's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
There's several: http://community.bistudio.com/wiki/ArmA_2:_CfgVehicles#Air_Class_Vehicles -
Getting tanks to fire and miss
wokstation replied to Funkman's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
It may be the marker that's the problem then - you need some other target...? -
Running commands from the INIT.EXT not working
wokstation replied to Koni's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Two things: initintro.sqf gets ran automatically at the start of the intro, in exactly the same way as init.sqf does for the mission. No more having to call your init from a unit on the map ;) The other is if that doesn't sort it and you still get a moment of player-cam, would fading-from-black help? -
GetNearestObject: how to find the closest player to an object???
wokstation replied to Lucky44's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Reference all the players in an array, and then check the object found against the array? eg... _myobject = nearestObject [objectname, "Man"]; if (_myobject in MyBigArrayOfPlayers) then { // Pop your codey stuff here };