Jump to content
  • 0

Need help with a static mission in Wicked AI


BetterDeadThanZed

Question

I'm using I'm trying to create a static mission. I replaced this line:

_position = [80] call find_position;

with this line:

_position = [13538.621,5309.9609,0];

The log is throwing this error: 

h_missionrunning = false;
};>
16:11:11   Error position: <};>
16:11:11   Error Missing {
16:11:11 File z\addons\dayz_server\WAI\missions\hero\sorenberg.sqf, line 150
16:11:11 Error in expression <,_position];

I assume I have _position formatted incorrectly? How should that line be formated?

 
My next issues is with the placement of objects in the mission with static positions. How do you specify a direction? For example:
_baserunover0  = createVehicle ["MAP_Barbedwire",[13420.917, 5374.373, -4.5776367e-005],[], 0, "CAN_COLLIDE"];

I want that object to be facing a direction of -56.326088. If this were just a map addon, I'd use the setDir command. Is there a way to specify the direction of something in a static mission like this?

 

Lastly, I wanted to have M240 machine gun nests as static guns in the mission. I used this

[[13424.713, 5373.127, 0],"Fort_Nest_M240","random","bandit","bandit",0,2,"random","random",_mission] call spawn_static;
[[13589.972, 5244.6523,0],"Fort_Nest_M240","random","bandit","bandit",0,2,"random","random",_mission] call spawn_static;

They didn't show up.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Hi Zed,

 

Your _position seems fine to me. I assume there really is a { missing in your file.

 

As for the static guns, I'm afraid I've never seen a M240 nest used in this role in any mission system, they all use "M2StaticMG".  But perhaps you only have to use an array of arrays like

[[[(_position select 0) - 10, (_position select 1) + 10, 0]],"M2StaticMG","Easy","Hero","Hero",0,2,"Random","Random",_mission] call spawn_static;

The spawn_static call seems to support an array of position vectors [[x1,y1,z1],[x2,y2,z2]] but you only provided a single vector [x,y,z] -> use a single-member-array of vectors [[x,y,z]].

In your case, I guess you could create your 2 nests simultanously

[[[13424.713, 5373.127,0],[13589.972, 5244.6523,0]],"Fort_Nest_M240","random","bandit","bandit",0,2,"random","random",_mission] call spawn_static;

In the new WAI they seldom use setDir (I've seen it within loops) but afaik they didn't change that much regarding mission internals, so for the direction you could try going with the old method

_baserunover = createVehicle ["land_fortified_nest_big",[(_position select 0) - 40, (_position select 1),-0.2],[], 0, "CAN_COLLIDE"];
_baserunover setDir 90;
_baserunover setVectorUp surfaceNormal position _baserunover;
Link to comment
Share on other sites

  • 0

Ok, got the mission mostly working. The last thing I need to fix is the assassination target. I placed the target in a building but it seems that the AI have a problem with staying put. I'd like to spawn the target in a building and have him stay there. For some reason, it seems like when I put the target in a building, he ends up on the roof when he spawns. Any fix for this or do I have to settle with spawning the target outside? How can I get the target to stay within a small area and not run away?

Link to comment
Share on other sites

  • 0

That seems to be really complicated (for my level of understanding), see something like

http://forums.bistudio.com/showthread.php?76107-Putting-AI-on-top-of-objects-and-how-to-unarm-them&p=1328174#post1328174

which uses 'building positions'. I don't even know if the DayZ and Epoch buildings have these....

 

Perhaps http://www.ofpec.com/forum/index.php?topic=34622.0

 

Choose an enterable building, put the AI near it and than use the

_building = nearestBuilding _obj;
_obj setPos (_building buildingPos _index);

mit _index a fixed buildingpos making the AI accessible or random like in the code cited in the second link.

 

I'd be really interested in the result if this works out as I would have liked to place the AI in DZMSHotSpots in the building....

Link to comment
Share on other sites

  • 0

I am also having an issue with my static mission not spawning, My normal mission are working great so any help with my static missions would be fantastic. Here is my default file as I have it right now:

 

//STATIC GUNS, DUBO AIRFIELD NORTH
 
[[[16448.199,11468.9,0],[16460.199,11496.7,0]],"M2StaticMG",0.5,"Bandit2_DZ",1,2,"","Random"] call spawn_static;
 
//PARADROPS, KAMBASE
 
[[8511.03,20035,0],[8357,20382.301,0],300,"UH1H_DZ",6,0.8,"Random",4,"","Bandit2_DZ","Random",False] spawn heli_para;
//KAMBASE2
[[8520.69,19922.5,0],[8947.3,19060.801,0],300,"UH1H_DZ",6,0.8,"Random",4,"","Bandit2_DZ","Random",False] spawn heli_para;
//DUBO RUNWAY
[[16515.6,10809.1,0],[17051,7305.04,0],600,"UH1H_DZ",7,"Random","Random",4,"","Bandit2_DZ","Random",False] spawn heli_para;
//DAL DOCKS
[[14964.2,18449.801,0],[13351.7,19463.6,0],600,"UH1H_DZ",4,"Random","Random",4,"","Bandit2_DZ","Random",False] spawn heli_para;
//PRISON WEST
[[11856.6,21073.6,0],[10408.5,19978.199,0],600,"UH1H_DZ",8,"Random","Random",6,"","Bandit2_DZ","Random",True] spawn heli_para;
//PRISON EAST
[[11925.4,21032.6,0],[12419.4,19372.199,0],600,"UH1H_DZ",8,"Random","Random",6,"","Bandit2_DZ","Random",True] spawn heli_para;
 
//HELI PATROL, KAMBASE
 
[[8524.79,19962.199,0],[8524.79,19962.199,0],150,4,"UH60M_EP1",1] spawn heli_patrol;
 
//FOOT PATROL, PRISON
 
[[11925.4,21032.6,0],5,1,"Random",4,"","Bandit2_DZ","Random"] call spawn_group;
 
//VEHICLE PATROL, DUBO HWY
 
[[16540.801,12630.6,0],[15870.6,10224.6,0],50,5,"HMMWV_Armored",1] spawn vehicle_patrol;
//WEST ISLAND, WEST HWY
[[3761.71,7422.9,0],[7434.63,4728.95,0],50,5,"HMMWV_Armored",1] spawn vehicle_patrol;
Link to comment
Share on other sites

  • 0

Trying to get position for ai for static mission, , tried using private hive tools to get the mission ( modifying a mission that works, , copied the world space info from PHT, but got nothing .actually doing that killed all the static missions, rolled back the PBO and working again, so obviously the world space example [[5072.00,9400.00,0] is incorrect for WAI .. so how in on live map can I get the position .. really hard without seeing where the other ai in relationship to map location in that area where current static is.. I read somewhere that thats pretty much all it PHT was good for lol .. I haven't had much success with it for a functional tool my self so far, I'm using another just wanted to use the world map pos for the static. 
I have seen mention of a util that does something to this effect but was a while ago . and now cant find it.. any help appreciated!

Link to comment
Share on other sites

  • 0

Copying worldspace coordinates from PHT should work (only use [x,y,z] from [dir,[x,y,z]]) at least once you strip it of all unneeded brackets.

Each coordinate comes as [x,y,z], any opening [ as in your example [[x,y,z] comes only as part of a longer

statement [ [x,y,z] , whatever ].

Link to comment
Share on other sites

  • 0

Copying worldspace coordinates from PHT should work (only use [x,y,z] from [dir,[x,y,z]]) at least once you strip it of all unneeded brackets.

Each coordinate comes as [x,y,z], any opening [ as in your example [[x,y,z] comes only as part of a longer

statement [ [x,y,z] , whatever ].

 

Here is the exact statement .. [[1381.7,4099.63,0.001],4,"easy","Random",4,"Random","RU_Policeman_DZ","Random", "Bandit"] call spawn_group; 

when I enabled this .. all of the static locations went off. went back to pre-change server,pbo and they all came back to working 

 

Also one mission setup with dif cords but is exactly the same other wise .. shoots at every heli that flies over, the other missions don't seem to give two hoots if a heli lands on the roof lol .. what is up with that ?

Link to comment
Share on other sites

  • 0

In the statement in itself I don't see an error.

 

You could try to post the complete sqf and/or your server rpt (in spoiler and code tags).

I'd also use a diff-tool (I like meld) to compare the files before and after your changes, otherwise overlooking something is fairly easy.

 

I'm sure that changing coordinates only won't trigger a different AI behaviour. More likely the mission shooting has weapons capable of hurting the heli, the others don't.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...