Bellicosity
Member-
Content Count
40 -
Joined
-
Last visited
-
Medals
Everything posted by Bellicosity
-
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.
-
Silenced Weapons and AI
Bellicosity replied to breeze's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
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 http://community.bistudio.com/wiki/addAction
-
Ammo caches + parachutes
Bellicosity replied to thierry007's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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; }; };
-
Silenced Weapons and AI
Bellicosity replied to breeze's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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? -
Catch when satchel charge explodes
Bellicosity replied to Bellicosity's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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?"; -
Catch when satchel charge explodes
Bellicosity posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
How to get AI to use RPG against choppers?
Bellicosity replied to fiach's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
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
-
Small Question ( I hope)
Bellicosity replied to icfhoop's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Is that tested dale? -
Efficiency question: sleep vs waitUntil
Bellicosity replied to galzohar's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
"waituntil" problem
Bellicosity replied to RolloTomassi's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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'
-
Spawning an active flying aircraft with a trigger..
Bellicosity replied to Howard's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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; }; }; -
Spawning an active flying aircraft with a trigger..
Bellicosity replied to Howard's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
Three Fireteams plus one Staff Sergeant
Bellicosity replied to Jimmy the Saint's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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) -
Setting behavior across multiple individuals
Bellicosity replied to jakerod's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
{ _x setDamage 1 } foreach array1 And if blu_road_block_1 is the name of a guy, it should be sans " -
Silenced Weapons and AI
Bellicosity replied to breeze's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I would strongly suggest hintsilent over hint unless you want to go insane after a minute -
1.3 Bug DeleteCollection
Bellicosity replied to Bellicosity's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Crashing to desktop is not the way the engine should handle this imho -
1.3 Bug DeleteCollection
Bellicosity replied to Bellicosity's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
Comms and Custom menues
Bellicosity replied to dfear's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sample code would indeed be cool -
Loading old vanilla Arma maps in Arma 2 with CAA1 - Just Wow - Performance & Beauty
Bellicosity replied to p75's topic in ARMA 2 & OA - GENERAL
Can someone post screenshots?