-
Content Count
4333 -
Joined
-
Last visited
-
Medals
Everything posted by Grumpy Old Man
-
Daytime question
Grumpy Old Man replied to Taylor1984's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If you want to check or compare dates you can use dateToNumber and numberToDate. If you want to do a simpler check when stuff will happen on the same day, simply use daytime. dayTime is rather straightforward, 10 being 10:00, while 10.5 is 10:30. Cheers -
Automatic Spawning Mortor team that fires?
Grumpy Old Man replied to Grim5667's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Might be the position error of the command messing things up, you could simplify it like this: _rndTarget = selectRandom _nearby; _targetPos = getPosATL _rndTarget; So the final snippet would look like this: GOM_fnc_mortarAutoReveal = { params ["_mortar"]; while {alive _mortar AND canFire _mortar AND count crew _mortar > 0} do { _enemySides = side _mortar call BIS_fnc_enemySides; _mag = currentMagazine _mortar; _nearby = (getposatl _mortar nearEntities 4000) select {side _x in _enemySides AND _mortar getArtilleryETA [getposatl _x,_mag] > 0 AND getPosATL _x inRangeOfArtillery [[_mortar], _mag]}; //no enemies found which are in range and have a firing solution, skip and wait if (count _nearby > 0) then { _rounds = 4; _rndTarget = selectRandom _nearby; _targetPos = getPosATL _rndTarget; (effectiveCommander _mortar) commandArtilleryFire [_targetPos,_mag,_rounds]; systemchat format ["%1 targets: %2",effectivecommander _mortar,count _nearby]; sleep _rounds * 6;//give enough time to fire all rounds, then start over }; sleep (3 + random 3); }; }; GOM_fnc_spawnMortars = { params ["_side",["_debug",true]]; _sides = [west,east,resistance]; if !(_side in _sides) exitWith {systemChat "Wrong side parameter"}; _mortarTypes = ["B_Mortar_01_F","O_Mortar_01_F","I_Mortar_01_F"]; _mortar = _mortarTypes select (_sides find _side); _markers = allMapMarkers select {toUpper _x find toUpper str _side >= 0};//for east this returns all markers containing "east" in the name _mortars = []; if (_debug) then {systemchat format ["Spawning %1 mortars: %2",_side,_markers]}; { _mortarSpawn = _mortar createVehicle getMarkerPos _x; createVehicleCrew _mortarSpawn; _mortars pushBack _mortarSpawn; } forEach _markers; {[_x] spawn GOM_fnc_mortarAutoReveal} forEach _mortars; if (_debug) then {systemchat format ["Spawn finished: %1",_mortars]}; }; //now when you want to spawn the mortars simply do this: _spawn = [east] call GOM_fnc_spawnMortars; Should be more precise. Cheers -
bi mystery Modules Lag when Mission does not
Grumpy Old Man replied to JohnKalo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So you have multiple triggers doing the same thing? Are you using other practices similar to this one? Other than that try build stuff from the ground up and see when those "lags" start to show up. Vanilla first, add mod units/vehicles when the framework for the mission does what it should. Then add fancy stuff like video playback, music etc. Cheers -
Strange & perplexing problem with doFollow
Grumpy Old Man replied to madrussian's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not that I know of, seems the AI brain waits for the units to disembark, then waits for everyone to get in again. You could force every unit out of the vehicle using moveOut command, then immediately moveInAny, might do the trick but strongly depends on how the AI FSM is working. Cheers -
Location location?
Grumpy Old Man replied to NumbNutsJunior's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not sure if this is what you want, but you can retrieve all locations like this: _locations = nearestLocation [[worldSize/2,worldSize/2],[],(worldSize/2) * 1.4142]; Then you'd need to further filter for location names if you want a specific one. Cheers -
[Release] GOM - Aircraft Loadout V1.35
Grumpy Old Man replied to Grumpy Old Man's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The answer is in my third reply on this very page. Might be passing the variable name of a deleted object to the script maybe? None of the functions included in this script package handle player respawn or music playback on respawn. Might be some other script/mod causing this. Cheers -
Time inside a while
Grumpy Old Man replied to Barba-negra's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That's not proper syntax. Would look like this: if ((getposASLW _vehicle select 2) < -25 and (getposASLW _vehicle select 2) > -43) No idea where you getting at, you mention a smaller area depending on depth, yet your example doesn't show anything similar. Also the usage of getPosASLW can lead to unwanted results, especially with heavy sea (especially since you seem to check for depths between -83 and -85m). State exactly what you want to do, since there's probably a more convenient way to do it other than spawning and deleting triggers inside a while loop. Cheers -
Chances in an array
Grumpy Old Man replied to CreativeProduct's topic in ARMA 3 - MISSION EDITING & SCRIPTING
35? Try reading the wiki entry. Cheers -
Strange & perplexing problem with doFollow
Grumpy Old Man replied to madrussian's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Indeed this seems to be the case. Well the AI seems to be truly done for this iteration... Placed a HEMTT transport with a waypoint, a few units in the cargo slots, all of the same group. Then called this: {_x doFollow leader group _x} forEach units squadLeader; Half the squad left the vehicle, just to get in again. After that the vehicle starts moving towards the waypoint... Not really sure if it's worth it to post a ticket. Cheers -
Time inside a while
Grumpy Old Man replied to Barba-negra's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This looks sketchy as hell. The while true loop will run every second, creating a trigger every second when the _vehicle is 25m below water. _vehicle also is undefined inside the scope you're using it. Did this even work when you tried it? What do you want to achieve? Also post using code tags and proper indentation, makes it easier to go through. Cheers -
Is it better to have multiple functions or 1 big function ?
Grumpy Old Man replied to xjoker_'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Don't worry about performance until you run into performance issues caused by your scripts. Other than that depends on your workflow I guess. I've grown fond of having multiple smaller, specialized functions where possible. Makes it easy for the eyes having to go over a few lines vs scrolling through 1000+ lines. Cheers -
Searching a script
Grumpy Old Man replied to Vitouse's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Where exactly did you search? Won't find any scripts in a barn, just saying. Cheers -
Carrying? What do you mean? Cheers
-
Scripts that used to work freezes at loading now.
Grumpy Old Man replied to kocrachon's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Your while loop has no sleep inside, might be causing it since it will run at full speed, didn't look much further though. Cheers -
[IceBreakr/IBIS] Lingor & Dingor for A3
Grumpy Old Man replied to icebreakr's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Almost got a heart attack when I saw you replying to this thread, thought 3.9 is happening! Most favorite map by far, keep up the good work! Cheers -
INTRO - need some good tutorial
Grumpy Old Man replied to pierremgi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just ditch the idea of using the vanilla intro/outro stuff and script it via event files depending on for whom you want to run this intro. Cheers- 3 replies
-
- intro
- mission.sqm
-
(and 2 more)
Tagged with:
-
Draw circle on terrain in script
Grumpy Old Man replied to JB47394's topic in ARMA 3 - MISSION EDITING & SCRIPTING
19 minutes ago, heh... Maybe you'll make it within a minute on mercury. Cheers -
spawn spawning a icon om map thru trigger
Grumpy Old Man replied to Play3r's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Make sure to check out the alternative syntax for most scripting commands, quite a few neat additions in the last 2 years. Cheers -
Draw circle on terrain in script
Grumpy Old Man replied to JB47394's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No idea if there's a formula (might be) for it and if the thread starter actually needs it. My geometry lessons are in the distant past, heh. Cheers -
[SOLVED] Addaction run once
Grumpy Old Man replied to anfo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In the script parameter. Cheers -
[SOLVED] Addaction run once
Grumpy Old Man replied to anfo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
With multiple actions on the same object this could lead to unwanted removal of actions added by other scripts/addOns. Cheers -
[SOLVED] Addaction run once
Grumpy Old Man replied to anfo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Inside the addAction: _this#0 removeAction _this#2 Cheers -
Draw circle on terrain in script
Grumpy Old Man replied to JB47394's topic in ARMA 3 - MISSION EDITING & SCRIPTING
For using proper math you'd use something like this: _centerPos = getPosATL player; _centerPos params ["_centerPosX","_centerPosY"]; _distance = 20; _angle = 2;//will place objects every 2° for "_i" from 0 to (360-_angle) step _angle do { "Sign_Arrow_F" createVehicle [_distance*cos(_i) + _centerPosX,_distance*sin(_i) + _centerPosY]; }; Basic formula to get positions of a circle. Cheers -
spawn spawning a icon om map thru trigger
Grumpy Old Man replied to Play3r's topic in ARMA 3 - MISSION EDITING & SCRIPTING
On a sidenote, you can look at script commands sorted by functionality: Go to the Scripting Commands page Click Scripting Commands by Functionality Click Command Group: Markers All there in plain text. Cheers -
Any official info on backwards compatability of ENFUSION engine and Arma 3 content?
Grumpy Old Man replied to xon2's topic in ARMA 3 - GENERAL
Thought there were zombies in dayz? Cheers- 14 replies