Jump to content

demonized

Member
  • Content Count

    2658
  • Joined

  • Last visited

  • Medals

Everything posted by demonized

  1. the eventhandler just automatically runs when you use a weapon, for example what unit throws wich smoke grenade. so you dont have to have a script "watching" the area around the player for "smokegrenades". however there is after some thought, many different issues that arise using eventhandler wich needs to be considered or accounted for, and for a new scripter kylanias way would be the best choise for easy control. in this case a eventhandler is probably just making the easy more difficult. your script posted above looks like the best approach for your purpose, since you look for smoke near player so the possibility of wrong grenades would be small or insignificant. edit: did not see last posts before posting...
  2. something like this using fired eventhandlers, tested. _idx = player [url="http://community.bistudio.com/wiki/addEventHandler"]addEventHandler [/url]["Fired", { if ((_this select 5) != "SmokeShellGreen") exitWith {}; _null = (_this select 6) spawn { _pos = getPos _this; sleep 1; while {(_pos distance (getPos _this)) > 0} do { _pos = getPos _this; "myMarkerName" setMarkerPos _pos; sleep 1; }; }; }]; just be aware that you should remove the eventhandler if there is a time where the player should be able to throw smokes without marker moving... edit: corrected while loop, it did not end due to missing line, now it does.
  3. demonized

    AI V-22 Helicopter

    you can make it VTOL constantly by limiting speed, but the turn time of the osprey is then very, very slow. for example this VTOL forever, you can adjust speed up or down to see what is max speed for VTOL: while {true} do { osprey [url="http://community.bistudio.com/wiki/limitSpeed"]limitSpeed [/url]50; sleep 0.1; };
  4. http://www.kylania.com/ex/?p=84
  5. demonized

    Spawning "Compositions"

    http://community.bistudio.com/wiki/BIS_fnc_spawnGroup http://community.bistudio.com/wiki/BIS_fnc_taskDefend
  6. demonized

    Spawning "Compositions"

    yes ofc, getPos player and getDir player is what to change, make it: _newComp = [[b][i](getMarkerPos _markerName), (markerDir _markerName)[/i][/b], "SmallBase"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf")); then place your marker and rotate it the way you want the composition to face. Edit: i did not scroll through the .rpt file you posted. looking at your .rpt print, id say its time for a reinstall maybe of Arma2 on your pc...... or deffinetly a good defrag.. ---------- Post added at 06:03 AM ---------- Previous post was at 05:58 AM ---------- this is how my .rpt print turns out: im using A2, CO + BAF and PMC full, no addons. patch 1.59, patch 1.10 A2.
  7. demonized

    Spawning "Compositions"

    this line works as is: newComp = [(getPos player), (getDir player), "HeliParking1_RU"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf")); tested.
  8. demonized

    Spawning "Compositions"

    Mr_Centipede is totally correct, from my cfgCompositions list i get this: "46------[b]HeliParking1_RU[/b]------["helicopter","parking","east","ru"]" the bolded part is what to use with spawning.
  9. i always place 1 of each side on map with prob 0%, then all centers are covered. i havent noticed anything with center as i use it very rarely. did you set them captive or something? or did you do anything else, maybe use wrong side for the BIS_fnc_spawnGroup ? they dont like west units spawned in a east group etc..
  10. after some testing, it seems nearEntities only return alive items, lasermarker activated is a "alive target", gamelogic aswell. all those is included in nearestObjects list, along with all other items like buildings and rcks. so: entity == alive(in some way) object == alive or dead whatever. edit: testing done with:
  11. yeah, Entity == Object. only difference i see is that nearestObjects list nearest one first, and its not descibed in nearEntities, maybe that makes entities faster, since it doesnt calculate distance for all before filling them into list SO: nearEntities is fast but unstructured in list, nearestObjects is slower but listed according to distance from point. by slower, i mean more CPU intensive. entity == alive object == anything
  12. well, the nearest object is listed first sticks out for me. maybe try reading and not glancing ;)
  13. demonized

    Spawning "Compositions"

    btw, here is what i did to collect all the current installed compositions in .rpt place script in init.sqf and place yourself in center of a map(only if you want to see them), then wait for hint and check .rpt file for all glorious info. PS: uncomment the _newComp line and place yourself in the lower left corner of the desert map and you can (hold ALT + click)teleport around viewing all different compositions, youll see markers on map with what they are.
  14. using MP framework for making this work without hitches even on JIP. http://community.bistudio.com/wiki/Multiplayer_framework
  15. @OP there is no problem in doing what you did in first post, and cobra shortened it abit, and piled it all into a single line, instead of spacing it out like you did, so its harder to understand. considering amount of lines like 10+ have zero effect on lag or scripts time. what you must consider is what the lines does, then a single line can easily out lag 2000 other lines. many ways of doing it, yours would be the way i would have done aswell, also just for the hell of it, here is a few other ways, similar and not, with a few less characters used than cobra: :D _vehs = []; { _veh = vehicle _x; if (_veh != _x AND !(_veh in _vehs)) then {_vehs = _vehs + [_veh]}; } foreach units _grp; hint format["vehicle count is %1",(count _vehs)]; _cnt = 0; { _veh = _x; if (({_veh == (assignedVehicle _x)} count (units _grp)) != 0) then {_cnt = _cnt + 1}; } foreach vehicles; hint format["vehicle count is %1",_cnt]; this one checks all vehicles ingame at that point, and checks if its assigned to any member of your group. simple checks go superfast, even when done on may many units like all vehicles, so it doesnt matter.
  16. demonized

    Spawning "Compositions"

    http://forums.bistudio.com/showthread.php?t=112767&highlight=compositions
  17. http://community.bistudio.com/wiki/High_Command
  18. demonized

    MBG Window of opportunity

    to play custom games in SP, just depbo whatever mission file, rearange what you need and place down enemy AI, groups etc, or script them and then play Woo, no "required" PvP to play it.
  19. huh? are you trying to make a motion sensor out of the ied? then a anyone or side present trigger would do just fine.
  20. no you dont need that, the player is unit check will exclude all else on its own, also you just can do it above the lines, instead of for each action, this would work just as fine. _vehicle = _this select 0; _side = _this Select 1; if (squadLeaderEast != player) exitWith {}; if (_side == EAST) then { hqe = _vehicle addAction ["Head Quarters Menu", "module\menu_items\HQ_east_dialog.sqf"]; }; if (_side == WEST) then { hqw = _vehicle addAction ["Head Quarters Menu", "module\menu_items\HQ_west_dialog.sqf"]; };
  21. probably not important, but you have this: @ACEX_USNavy[size="5"][color="Red"];;[/color][/size]@JayArma2Lib
  22. @Partyhead addaction is local, so if you place this in top of your script, before you add the actions: if ((getPlayerUID player) != "1234567") exitWith {}; only the player with the puid "1234567" will see the action, you can also use: if (unit1 != player) exitWith {}; now only the player that controls the unit named unit1 in editor can see the action. also here is link to addaction, wich you find more info on using special conditions, wich is very helpful with actions, all info is in there.
  23. demonized

    Spawning "Compositions"

    im having major deja vu on this one, but this is also one way of getting rid of an entire composition, well, more of a workaround, but in Arma thats just another way :) _before = nearestObjects [getmarkerpos "m6_10", [], 100]; // collect all objects in 100 meter radius before comp spawn. // spawn your composition here. _after = nearestObjects [getmarkerpos "m6_10", [], 100]; // collect all objects in 100 meter radius after comp spawn. _compObjects = _after - _before; // fix the list with only comp components, (remove all pre comp list from after comp list) // when you want to delete the composition: {deleteVehicle _x} foreach _compObjects;
×