Jump to content

aseliot

Member
  • Content Count

    118
  • Joined

  • Last visited

  • Medals

Everything posted by aseliot

  1. So i've looked around and what exactly is the right method of getting a unit (helicopter in this case) to move after a HOLD waypoint. I've read that they never complete so I have to use a SWITCH trigger or a SKIP WAYPOINT. But I haven't succeeded in getting neither of them to work so far, I could just do a domove on a position but that would be really ugly with public variables that I don't want/need. _wpswitchtrig = createTrigger ["EmptyDetector", position _insertheli]; _wpswitchtrig setTriggerType "SWITCH"; _wpswitchtrig setTriggerArea [10, 10, 0, true, 200]; _wpswitchtrig setTriggerActivation ["WEST", "NOT PRESENT", true]; _wpswitchtrig setTriggerStatements ["player in thislist", "hint 'player left';", ""]; _wpswitchtrig attachTo [_insertheli, [0,0,0]];
  2. Is there any script or any way to generate a script from a composition in order to create something like a composition. To, for example, spawn random encampments. I've seen this one already but it's not really what I am looking for.
  3. So me calling SHK_Pos in a trigger doesn't appear to work for some reason. I init SHK_pos like this. call compile preprocessfile "SHK_pos\shk_pos_init.sqf"; I call this all the time and works fine, but I tried to move some code that worked inside a trigger, but it gives a zero divider error at shk_pos_fnc_isinellipse.sqf. So note that it works fine outside the trigger. For some reason the size in this script is set to 0. _sitetrg setTriggerStatements ["player in thislist", " _checked = thisTrigger getVariable ['_checkScavengeSite',false]; if (!_checked) then { 0 = [] spawn { _markername = thisTrigger getVariable ['_trigMarkerName','NOTFOUND']; for '_l' from 0 to _lootnum do { _junkpos = [_markername,false,[]] call SHK_pos; [_junkpos, (selectRandom junkarr)] call rvgCoC_spawnLootObj; }; _thistrigx = ((getMarkerSize _markername) select 0)*2; _thistrigy = ((getMarkerSize _markername) select 1)*2; _maxloot = round((_thistrigy+_thistrigx) / 10); _lootnum = round((random (_maxloot/2))+(_maxloot/2)); _mrksize = _thistrigx+_thistrigy; _scvgnmrk = createMarker ['_scvngsite'+(str _sitepos),_sitepos]; _scvgnmrk setMarkerShape 'Ellipse'; _scvgnmrk setMarkerSize [_mrksize, _mrksize]; _scvgnmrk setMarkerAlphaLocal 0; mrkskiplist pushBack _markername; }; }; ",""]; I thought calling SHK_pos would be global.
  4. Is it possible to set some sort of source object when exporting to sqf, so you could make all other objects be relative to the position of that object instead of having it just generate positions within the world. This way you could have a sort of collection of objects positioned around a center that you can move around without having to worry about the other positions. Maybe it could be exported as a function? Because otherwise I don't really see the point of using this versus the 3d editor already in arma 3.
  5. Ah okay cool, i will check it out.
  6. Yeah i get that. But stupid me, it was another script that caused it. Not like the hint you get is any indication.
  7. Aw man, that was supposed to be a thisTrigger. But sadly still gives the same error. Yeah I know there's also something else is in there but i doubt it has anything to with it.
  8. aseliot

    Getting the AI to engage

    Maybe you can use reveal when they enter a trigger?
  9. This is about changing the gear of units spawned by another script from an addon. I tried using a trigger with ANY and "this" but it doesn't seem to work for units being spawned in? Or maybe the trigger was too big (about 4500,3000). There is an Init EH but is is only for configs. There is also the HandleIdentity EH but then you need a reference to the unit being spawned. So thing is the unit is spawned by an external script that is not mine and I have no handle to the unit.
  10. I am now doing it like this as all spawned units are also added to the garbage collector. 0 = [] spawn { while {true} do { { if (_x isKindOf "CAmanBase") then { _gasmask = _x getVariable ["_hasGasmask",false]; if (!_gasmask) then { removeGoggles _x; _x addGoggles (selectRandom spawnmasks); _x setVariable ["_hasGasmask",true]; }; }; } forEach rvg_garbage_collector; _gcount = count rvg_garbage_collector; waitUntil { _gcount != count rvg_garbage_collector }; }; };
  11. Yeah that would work, although I don't like the thought of it looping through all the units all the time. I got it work your way. But I would still like to try and use a trigger but it only keeps firing once for some reason... any ideas? _gmasktrg = createTrigger ["EmptyDetector", (getMarkerPos "playablemrk")]; _gmasktrg setTriggerArea [_trgx, _trgy, 0, true]; _gmasktrg setTriggerActivation ["ANY", "PRESENT", true]; _gmasktrg setTriggerStatements ["this", //code etc.. Already checked trgx,y they are something like 4500,3250 and based on playablemrk size. So it should just overlap the marker. It only fires once for some reason although it is set on repeatable.
  12. Any unit that would enter the trigger would get a small gear change, but it fired only once for some reason (reapeating was on true) but it must've been a fluke, it doesn't seem to work for units that are spawned in for some reason. Huh? I don't have access to the script, I am not allowed the change it the addon belongs to someone else. (Ravage)
  13. Ha yeah I thought about doing something like this too. But i've got a lot of suggestions now I will try something out. EDIT - I will just use pierremgi's solution for now.
  14. I've been trying to spawn cars as wrecks but I would have to use setDamage to do this and with disabling simulation they still blow up with sound. Is there nothing that can just set it to the wreck model? And I know there are wreck models this is about the usual car objects.
  15. Hi nice system and all but it's unclear to me how to add it to a unit the previous system had this thing where you do addAction, is that still the case? I used to get a _whatshop undefined error because of wrong parameters but I can't get it to do anything else. //Remove old stuff shopman addAction["<img image='HG\UI\gun.paa' size='1'/>Open Weapons Shop",{[shopman,player,1,"HG_DefaultShop"] call HG_fnc_dialogOnLoadItems},"",6,false,false,"",'(alive player) && !dialog']; //This works How do I add the whole shop functionality to a unit. EDIT - Okay i got it.
  16. I've gone from using a trigger to just using nearestObjects in a loop.
  17. I thought I did this somewhere before but nothing i've tried so far has worked. I wanted to make a trigger that detects objects in it, just anything and then checks it for something. But I can't get the basic thing to work... trigger = createTrigger ["EmptyDetector", (getPos player)]; trigger setTriggerArea [300, 300, 0, false]; trigger setTriggerActivation ["ANY", "PRESENT", true]; trigger setTriggerStatements ["true", "systemChat format['%1',this];", ""]; trigger attachTo [player]; I've tried STATIC, ANY, LOGIC. But it doesn't do anything.
  18. At least that does something, but it only prints the player.
  19. Only thing I can find is about spawning custom compositions but I want to spawn one like Camp Ant or Audacity. _newObjs = [getmarkerpos "marker_2",random 360,0.0, "Camp_Audacity"] call BIS_fnc_ObjectsMapper; Is as far as I get right now but it doesn't do anything, not even an error or anything. Also the only classnames I could find were from A2 https://community.bistudio.com/wiki/Dynamic_Object_Compositions#List_of_classnames
  20. aseliot

    Ravage

    I thought I read somewhere there was somekind of ravagegear array. And maybe some public function to gear a unit too? Otherwise I will just open the pbo and search for something myself.
  21. aseliot

    Ravage

    Do you have any functions/arrays I can use to spawn ravage units/loot in an area? Have been looking into the wiki but can't find anything.
  22. So i copied this code from another mission of mine that works (the trigger part). It errors on the createTrigger giving the "0 arguments given 3 expected". I guess the only thing causing this would be SHKpos? But i don't see how the arguments you can give it are confusing. _rdmaxsize is number (300) and _mrkskiplist a list of markers(names). Also the setMarkerColor doesn't work but I guess that is the error causing weird behavior. //code... _radzonetrg = createTrigger ["EmptyDetector", (getMarkerPos _radzonemrk)]; //solved //code...
  23. aseliot

    Error 0 arguments given

    Oh i see what you mean now...
  24. aseliot

    Error 0 arguments given

    Eh? What do you mean by this, the markers are all displayed on the map btw. I forgot to say that. The code actually works but errors and stops.
  25. aseliot

    Action event handler?

    Hey that's great, that fixes everything :o
×