Rommel
Member-
Content Count
1225 -
Joined
-
Last visited
-
Medals
Everything posted by Rommel
-
What is least CPU demanding?
Rommel replied to tophe's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No. If you want to test this out try the following. test.sqf _t = time; while{true}do{ if (_t != time)exitwith{_t = time - _t}; }; _t2 = time; waituntil{ if(_t2 != time)exitwith{_t2 = time - _t2}; 0>1 }; hintsilent format ["While loop cycle time: %1s \n Waituntil cycle time: %2s", _t, _t2]; You may have to times the results by 1000 or it may round off to 0. hintsilent format ["While loop cycle time: %1s \n Waituntil cycle time: %2s", _t * 1000, _t2 * 1000]; It could return what the delays are, but in any case, good chance your PC just may freeze up cause time seems to stop until the while loop completes (compliments of SQF). -
Eject/MoveInCargo Howto
Rommel replied to Rommel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Your mission.sqm seems ok, but maybe try without re-using the variable. {_x moveincargo UH1YA} foreach units S1; GS1 = group this; and _xhandle = [GS1,UH1YA] execvm "Eject.sqf"; Otherwise, if its a GET-OUT waypoint, it won't fire the onactivated until EVERYONE is disembarked, perhaps make it fired via a trigger that checks helicopter height. This could be why you don't see it working. -
Complicated, but I'm sure it will become easier as we all get greater understanding of the first aid carry module.
-
Eject/MoveInCargo Howto
Rommel replied to Rommel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Is S1 the name of your group or the name of your unit? Is UH1YA the name of your vehicle? Double check these variables, they are most commonly the error when executing scripts. The new code for eject.sqf (added type checks) will verify if your parsing the correct parameters to the script. -
Display Errors?
Rommel replied to Gil Galvanti's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
If you set your ArmA2 profiles directory to the ArmA2 directory, then the MPmissionscache, and arma.rpt and of course your profiles are all stored there. Check this for more information: http://community.bistudio.com/wiki/-profiles -
Can't Place Modules
Rommel replied to OmegaX's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ensure your selecting the module in the menu' correctly, and that your not using the original game logic method of placement. -
You as the group leader have the responsibility to order them to get out. Push ~, then 4-1 (while in game by the way), should do the trick if my memory serves me right; this will order all units in your group to disembark. If you wanted to automate it, simply run eject.sqf from this thread: http://forums.bistudio.com/showpost.php?p=1333949&postcount=7 Syntax; _xhandle = [group player, vehicle player] execvm "eject.sqf" Place in the way point for the get out or transport unload.
-
changing AIs AiingSpeed
Rommel replied to topeira's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Those commands did not work in ArmA1, but I'll have a definitive answer for you on Monday when I get my new GFX card... Maybe just muck around with setskill without using the array options for now. -
Activation: None | Repeat Type: None Condition: true OnAct: if (canMove plane) then {hint "something"} else {hint "something else"}; Activation: None | Repeat Type: None Condition: canMove plane OnAct: hint "something" Activation: None | Repeat Type: None Condition: not (canMove plane) OnAct: hint "something else" Just a few examples of how it could be done, remember the condition is in itself a if statement, and the then is the on activation.
-
http://forums.bistudio.com/showthread.php?t=76545 If you just wanted to parachute yourself, you could still use eject.sqf; _xhandle = [group player, vehicle player] execvm "eject.sqf"
-
AI Paradrop from C130J
Rommel replied to frattonstation's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
_xhandle = [<GROUP>,<VEHICLE>] execvm "Eject.sqf"; SQFised if (not isServer) exitwith {}; _group = _this select 0; _vehicle = _this select 1; sleep 2; { unassignvehicle _x; _x action ["EJECT", _vehicle]; sleep 0.5 } foreach units _group; Why bother with SQS, its useless. :p Safety function for those who don't want accidental para drops maybe? _height = (position _vehicle) select 2; if ( _height < 50 ) exitwith {hintsilent format ["%1, the %2 height is below 50m (current height: %3), unsafe to eject.", name player, typeOf _vehicle, _height]}; -
Activating a trigger causes a unit to appear
Rommel replied to heywheresmysnack's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Place a trigger, BLUFOR, set it to "Detected by OPFOR". Then have the trigger synchronized to a helicopter/unit who is far away, which then comes in under a way point defined by you. Might be easier, depending on the use. Hell you could put it on a cycle with a dynamic game Logic location for the move way point. -
What is least CPU demanding?
Rommel replied to tophe's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Both while loops and wait Until loops operate in the same way, however a while loop executes every cycle (unless there is a sleep). Whereas a wait Until loop does not, it appears to operate every 'few' cycles. -
_xhandle = this spawn {_pos = getpos _this; _this setpos [0,0,0]; sleep 600; _this setpos _pos}; Replace [0,0,0] with maybe a getpos of a place where the tank won't be 'disturbed', ie an island in the middle of nowhere.
-
I've noticed there is no 'de-spawn' of civilians with the ambient civilians module. A recording after flying over every town on Chernarus was a 20FPS drop and 600 units later. Imagine this lag stacking up on a dedicated server, and also with Ambient Civilian Vehicles turned on also. Aside from our own custom de-spawners (simple enough), why is this allowed to do so in the first place. :rolleyes:
-
Ambient Civilians - Overload
Rommel replied to Rommel's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ok, so this is the use of the deleteCollection command, but does this stop all multi-player traffic of these units? -
Vehicle respawn script
Rommel replied to dale0404's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yes. I will upload my example mission later today if possible as it seems there's some issues with how people are piecing it together. -
What is wrong with this code?
Rommel replied to Welcome To Hell's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
First thing I saw: outfit = compile preprocessFile "outfit.sqf"; So its an SQF file. _unit = _this select 0; //missing ; removeAllWeapons _unit; //missing ; _unit Addweapon _primweap; //removed " " Yet you forget the syntax; and tried adding a string with value "_primweap" to a unit. -
You could try converting it from the command date. It returns I think 5 variables, and the last one or two is the time in hours. Either that or you could just make a function to read day time. :)
-
Vehicle respawn script
Rommel replied to dale0404's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I've tested that code over and over; it works I assure you. Game logic marker positions. This is not possible. You have either a game logic, or a marker, not both. this addEventHandler ["Killed","[_this select 0, getpos player] spawn compile preprocessfile 'funcVehicleRespawn.sqf'"] spawns at position of player this addEventHandler ["Killed","[_this select 0, getpos logic1] spawn compile preprocessfile 'funcVehicleRespawn.sqf'"] spawns position of unit named logic1 (ie a game logic placed at a respawn at base) this addEventHandler ["Killed","[_this select 0, getmarkerpos respawn_west] spawn compile preprocessfile 'funcVehicleRespawn.sqf'"] respawns at position of the marker named respawn_west this addEventHandler ["Killed","[_this select 0, getpos _this select 0] spawn compile preprocessfile 'funcVehicleRespawn.sqf'"] spawns at its own position this addEventHandler ["Killed","[_this select 0, [0,0,0]] spawn compile preprocessfile 'funcVehicleRespawn.sqf'"] spawns at the position 0,0,0 Is that more clear of how you should use it? -
Always try to use SQF. SQS was old as soon as it hit ArmA1, it should be phased out by ArmA2. { _x action ["EJECT",vehicle _x]; unassignvehicle _x; sleep 0.5; } foreach units GROUPLEADER;
-
Vehicle respawn script
Rommel replied to dale0404's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Forgot a few syntax errors there Jan. Also simplified the code a little bit. vehicle Init Line this addEventHandler ["Killed","[_this select 0, POSITION] spawn compile preprocessfile 'funcVehicleRespawn.sqf'"] //Examples for variable "POSITION" //getpos player - returns position of player //getpos logic1 - returns position of unit named logic1 (ie a game logic placed at a respawn at base) //getmarkerpos respawn_west - returns position of the marker named respawn_west //getpos _this select 0 - returns its own position //[0,0,0] - returns the position 0,0,0 funcVehicleRespawn.sqf #define RESPAWN_DELAY 120 //in seconds //DO NOT EDIT CODE BELOW THIS _killed = _this select 0; _pos = _this select 1; _type = typeOf _killed; sleep RESPAWN_DELAY; _veh = _type createVehicle _pos; _veh addeventhandler ["Killed",format["[_this select 0, %1]", _pos] + "spawn compile preprocessfile 'funcVehicleRespawn.sqf'"]; -
empty (moved to your 2nd post)
-
Awesome, thanks for the information. I was just initially angry cause I had been so happy, then I thought theyd gone and made it only a server admin command, which I didn't like. :eek: old post
-
ArmA 2's Artillery Module
Rommel replied to headspace's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Example missions aren't working in 1.02? :( All the artillery pieces just aim up, but never fire.