Jump to content

Dielos

Member
  • Content Count

    10
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Dielos

  • Rank
    Private
  1. Hello, Is there a way to remove a group from the ACM? I want any group that triggers a specific event to become a target and then roam the area with SQF, even if it is an ACM group. But I fear that an ACM group is in some kind of ACM array and will be deleted as soon as it is at a certain distance from the player. So, if there is such an array, how to find it, access it, and then remove the group from it? Someone knows how this works? Thanks!
  2. Thanks a lot, Jezuro! Simpler than I thought!!!
  3. How can I sort an array with markers according to their distance to a specific position? I couldn't find any function for it... Thanks
  4. Wow, thanks both of you! It certainly is more complicated than I thought. I've never touched config files before, but it might be time to start learning them! I'll study both your systems, as I have to get to understand them first and then modify to what I want, but they do point me in the right direction! What I want to do at the end is find west locations with neighbouring locations with side east. Thanks again both of you! [Edit] Ok... TRexian, I started with your method as it's simpler for me right now. Calling bis_fnc_locations gives me all information I want, thanks! There is a problem, though. It fills me the map with citycenter markers and links between all towns, which is extremely cool, but I don't need them in my mission. I thought that with the debug option set to false, they wouldn't appear, but they do. It doesn't matter if it's set to true or false, the links always show. Is the debug option broken or am I doing something wrong?
  5. Hello, I'm trying to find the neighbouring locations to a specific one in Chernarus. As per the wiki, all locations have a preset variable called "neighbors" which can be called with the getvariable command. I find the location with the nearestlocation command and call the getvariable command with the result: _neighbors = _location getvariable "neighbors" But this always returns an error. I have also tried passing the name of the location without any result also. Does anybody now how this works? Thanks!
  6. Hello, I'm trying to figure out how to get the names of the locations in Chernarus. I haven't found anything yet searching through the forums and I might not be understanding the wiki correctly. I've tried the following: _nearestCity = nearestLocation [getPos player, "NameVillage"]; hint format["Distance to %1 of type %2: %3", name _nearestCity, type _nearestCity, Player distance locationPosition _nearestCity]; It gives me the info on the nearest location to the player of type "NameVillage". It gives me a correct distance and type, but the name of the location stays empty but gives no error! As the wiki says, each location has several variables, and one of them is "name". Why is it not showing? Am I forgetting to initialize something before or what am I doing wrong? Functions Module is in the map and initialised... Thanks!
  7. Hi, I've searched through the forums and haven't found an answer. The AI is supposed to check a location's side and if not from it's own side go and take it. The following script gives them a waypoint to that location and monitors if locations side changes. There are 6 groups per side all running this script. It works well for most groups, but some do several locations and then just stop. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = _this select 0 _unittype = _this select 1 _testing = _this select 2 _unitside = side _unit _group = group _unit #start ~2 ;[_unit] exec "testloop.sqs" ?{alive _x} count units _group <= 0:goto "alldead" _group addWaypoint [getpos _unit, 50] goto "setwpp" ;=============MAIN LOOP START============ #mainloop ~2 ;_testtext = text _nearloc ;?(_testing == 1):hint format["%1",_testtext] ?{alive _x} count units _group <= 0:goto "alldead" ?(getPos leader _group in _nearloc):goto "inposition" ?(side _altloc != _unitside)&&(leader _group distance locationposition _altloc <= leader _group distance locationposition _nearloc):goto "setwpp" goto "mainloop" ;==============MAIN LOOP END============= #setwpp ~1 ?{alive _x} count units _group <= 0:goto "alldead" _locarray = nearestLocations [getPos leader _group, ["NameLocal"], 5000] ~1 _loccount = count _locarray ~1 _i=0 ~1 #locfind ~0.1 ?(_i >= (_loccount -1)):goto "setwpp" _locside = side (_locarray select _i) ?(_locside == _unitside):_i=_i+1;goto "locfind" _nearloc = (_locarray select _i) [_group, 0] setWPPos getpos _unit [_group, 1] setWPPos locationposition _nearloc [_group, 1] setWaypointType "SAD" [_group, 1] setWaypointBehaviour "AWARE" _group setCurrentWaypoint [_group, 1] _testtext = name _nearloc ?(_testing == 1):hint format["%1",_locarray] goto "mainloop" #inposition ~15 ?{alive _x} count units _group <= 0:goto "alldead" ?(side _nearloc == _unitside):goto "checkgroups" ?(side _nearloc == resistance):goto "inconflict" goto "inposition" #inconflict ~15 ?{alive _x} count units _group <= 0:goto "alldead" [_group, 1] setWPPos [((locationposition _nearloc) select 0) + ((random 100) - (random 100)), ((locationposition _nearloc) select 1) + ((random 100) - (random 100))] ?(side _nearloc == _unitside):goto "checkgroups" goto "inposition" #checkgroups ~10 ?(side _nearloc == _unitside):_altloc = _nearloc;goto "setwpp" ?(side _nearloc == resistance):goto "inconflict" goto "checkgroups" #alldead [_unitside,_unittype] exec "spawnai.sqs" exit If I get into the group as non leader I can see the waypoint in the map normally and they move towards that direction, but then the waypoint changes at a certain time into a cross and the group just stops. It's a urban environment (Sakakah Al Jawf (Open Beta)). Can it be because they get lost between all the buildings? Sometimes they even stop in building free areas! If it's because they get lost, is there anyway to solve this? Thanks!
  8. The loop isn't finished yet. I was just testing the drop. But you're right. I still don't understand why they kept cloning endlessly... But thanks
  9. Hello, hope someone can help me with this. The idea is to for two planes coming from two different directions with 24 units in each plane to parachute over a random area defined by the mission. I tried to insert the paradrop procedure into a small loop, but something is going really wrong. As the paradrop position is random and might be near water, often happens that they parachute over water. So I tried putting the part with the "surfaceiswater" to force the plane to eject the cargo units only when over land. And it does actually work, but the problem is that instead of dropping the 24 units in the cargo, it seems to start dropping an unlimited ammount of units out of the plane (much more than actually available! until the computer locks due to the CPU load. I don't know where or why they are cloning. Here the loop: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _Var1=0 _Var2=0 #startloop ?(_plane1 distance getmarkerpos "Conflict" <= 1600):_plane1 SetSpeedMode "normal";_Var1=2 ?(_plane2 distance getmarkerpos "Conflict" <= 1600):_plane2 SetSpeedMode "normal";_Var2=2 ?((_plane1 distance getmarkerpos "Conflict" <= 700)or _Var1==2)&&(_Var1==0 or _Var1==2)&&(!(surfaceiswater position _plane1)):[_wgrp1,_plane1] exec "parachute.sqs";_Var1=1;[_wgrp2,_plane1] exec "parachute.sqs" ?((_plane2 distance getmarkerpos "Conflict" <= 700)or _Var2==2)&&(_Var2==0 or _Var2==2)&&(!(surfaceiswater position _plane2)):[_rgrp1,_plane2] exec "parachute.sqs";_Var2=1;[_rgrp2,_plane2] exec "parachute.sqs" goto "startloop" Maybe I did the IF statement too messy? Is there a simpler way of doing this without the units cloning themselves? Thanks for any help in advance... Ok, just solved it by placing "_Var!=1" in the first IF statement... Still I don't understand how they kept spawning. Should it not once the plane is empty not ejecting any more? How do they clone???
×