Bellicosity
-
Content Count
40 -
Joined
-
Last visited
-
Medals
Posts posted by Bellicosity
-
-
If you make it respawn_west_1 (I think, it might be respawn_west1) then they will randomly spawn between the MSP and the base
Another thing you might do is add an action to a flag like Domi has that says something like
_caller setPos (getPos MSP)
Take a look at this to see what I am talking about
-
I used this code to drop an ammo crate from a plane via an action, Im sure you can adapt it to do it at a preset time
_gen = _this select 0; _caller = _this select 1; _id = _this select 2; _ammoBox = "USVehicleBox" createVehicle [0,0,0]; _parachute = "ParachuteMediumWest" createVehicle getPos _gen; _vector = velocity _gen; _vectorLength = (sqrt (((_vector select 0) * (_vector select 0)) + ((_vector select 1) * (_vector select 1)))); _unitVector = [(_vector select 0) / _vectorLength, (_vector select 1) / _vectorLength, (_vector select 2) / _vectorLength]; _parachute setPos [(getPos _gen select 0) - (10 * (_unitVector select 0)),(getPos _gen select 1) - (10 * (_unitVector select 1)), (getPos _gen select 2) - (10 * (_unitVector select 2))]; _parachute setVelocity (velocity _gen); sleep 0.1; _ammoBox attachTo [_parachute, [0,0,0]]; waitUntil { getPos _parachute select 2 < 6 }; detach _ammoBox; _ammoBox setPos [getPos _ammoBox select 0, getPos _ammoBox select 1, 0]; sleep 5; deleteVehicle _parachute; -
null = [] spawn { while {true} do { "respawn_west" setMarkerPosition (getPos MobileSpawn); sleep 1; }; }; -
Looking at that code you posted previously... there is a lot of undefined variables. It'd really help reading your code if you put
_blah = _this select 4
and used that through out your code (obviously changing blah to something descriptive).
Im going about trying to mimic the results of that code in a different manner but have came across a hiccup... need the typeOf for every russian soldier. "Man" gets every soldier, anyone know what will return only russian soldiers?
-
I tried this on a fired eventhandler but it also fires if they pick up the satchel
_unit = _this select 0; _weapon = _this select 1; _muzzle = _this select 2; _mode = _this select 3; _ammo = _this select 4; _shot = nearestObject [_unit, _ammo]; sleep 0.005; waitUntil { !alive _shot }; hint "Boom?"; -
Dont tell it to fire at the helicopter, tell it to fire at where the helicopter is/going to be. It'll do that just fine
-
I get how to catch when someone places it but how do you catch when it explodes?
I'd like the alarm to go off if it explodes, so if there is code to catch if ANYTHING explodes that'll probably work too
-
Norrin's script has been causing major lag/desync on the few missions in our community that have tried it with 20+ players
-
Yeah you can update that markers position to the vehicle's position. OR you can do like domi does and have some object with an action that teleports them to the vehicles position
-
just have a loop that updates the respawn markers position to the position of said vehicle
-
Is that tested dale?
-
I think you're splitting hairs if the check in the waitUntil is a relatively easy operation
I'd imagine that a sleep has the game checking every frame if time > (oldTime + sleepTime) then going its merry way whereas a waitUntil of someBool == someOtherBool or a waitUntil of someNumber < anotherNumber is going to be doing the same damn thing (as sleeping) every frame.
-
Have you tried doing something like
hint format ["%1", getPos _troop]
and
hint format ["%1", getPos _log];
into radio calls and seeing if they are actually within 50 meters of each other?
(Change the variables so they aren't private in scope first though)
-
One key step you all are missing...
Empty doesnt show up unless there is one unit set to 'player'
-
Save the a10's into an array, something like this (NOT TESTED):
if (isServer) then { count = 0; while { count < 5 } do { A10s = []; _grp = createGroup west; _wp = _grp addWaypoint [getPos Armor1, 0]; [_grp, 0] setWaypointType "SAD"; [_grp, 0] setWaypointCompletionRadius 200; for [{_x = 0}, {_x <= 2}, {_x = _x + 1}] do { _a10 = "A10" createVehicle [(getMarkerPos "PlaneSpawn" select 0), (getMarkerPos "PlaneSpawn" select 1), 250]; _a10 setPos [(getPos _a10 select 0) + (_x * 40), getPos _a10 select 1, 250]; _a10 engineOn true; _a10 setDir 290; _dir = 290; _speed = 500; _a10 setVelocity [(sin _dir * _speed),(cos _dir * _speed), 0]; "USMC_Soldier_Pilot" createUnit [getMarkerPos "PlaneSpawn", _grp]; (units _grp select _x) moveInDriver _a10; (units _grp select _x) setSkill 1; (units _grp select _x) flyInHeight 250; A10s = A10s + [_a10]; }; waitUntil { {alive _x } count A10s == 0 }; count = count + 1; }; }; -
here is the code I used in an older mission to spawn 3 flying a10's
_grp = createGroup west; _wp = _grp addWaypoint [getPos Armor1, 0]; [_grp, 0] setWaypointType "SAD"; [_grp, 0] setWaypointCompletionRadius 200; for [{_x = 0}, {_x <= 2}, {_x = _x + 1}] do { _a10 = "A10" createVehicle [(getMarkerPos "PlaneSpawn" select 0), (getMarkerPos "PlaneSpawn" select 1), 250]; _a10 setPos [(getPos _a10 select 0) + (_x * 40), getPos _a10 select 1, 250]; _a10 engineOn true; _a10 setDir 290; _dir = 290; _speed = 500; _a10 setVelocity [(sin _dir * _speed),(cos _dir * _speed), 0]; "USMC_Soldier_Pilot" createUnit [getMarkerPos "PlaneSpawn", _grp]; (units _grp select _x) moveInDriver _a10; (units _grp select _x) setSkill 1; (units _grp select _x) flyInHeight 250; };Been tested and works
If someone wants to clean it up from the magic numbers and add parameters to it for a sqf function like, be my guest.
-
Multiplayer how to:
- Sync the HC module to the leader and each subordinate module
- Sync the subordinate module to EACH unit of the subordinate group (otherwise if there isnt a leader or the leader dies you lose HC control)
-
{ _x setDamage 1 } foreach array1And if blu_road_block_1 is the name of a guy, it should be sans "
-
I would strongly suggest hintsilent over hint unless you want to go insane after a minute
-
Crashing to desktop is not the way the engine should handle this imho
-
Make a gamelogic with this in its init:
deleteCollection (getPos this nearestObject 353938)
Its the tree inside Rog if you're wondering
The first time you preview everything is dandy and the tree is gone
The second time it crashes the game
-
It took me some time to figure out what was causing this so I hope this post will help someone in the future. Every SECOND time I would preview a certain mission ARMA2 would crash on me. I deleted portions of the mission at a time trying to narrow down what was causing it.
I finally found it. It was a game logic with a deleteCollection being ran on a nearby static object. It worked the first preview through but the second one crashed the game.
Very annoying to say the least. Hope someone else doesnt spend a chunk of their time trying to figure out the same thing.
-
Sample code would indeed be cool
-
Can someone post screenshots?
Silenced Weapons and AI
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
Between posting that and now I have came across a separate solution to the problem, thank you though!
Still have an issue of catching when something explodes (cuz that would OBVIOUSLY set off an alarm), although specifically just a satchel charge is all I really need.