Jump to content
Murklor

Editor based AI spawn script by trigger

Recommended Posts

My answer is yes, though I didn't tested it on Dedi, but I didn't change anything either. I just added some features, so it should.

Let me know.

Thanx

Share this post


Link to post
Share on other sites

Hi ArmAIIholic,

Yes all works great on the Dedi - just have to be little careful with the triggers to start them if you start to may all at once using the loader some groups do not spawn , if you leave a few seconds between the triggers fire they all spawn fine.

No idea why it did not work before on Lingor , but started a completely new mission and it works a treat , great update on this Script BTW.

Recommendations, if you ever get time that is ïŠ

1. Used static objects do not seem to work - when spawned back in the man just stands next to the object

2. Unmanned Objects do not work - never have in the original would be goods so you can spawn them in the same

Thanks again for a cool script !

Share this post


Link to post
Share on other sites

I noticed problem #1. And I temporarily solved it by assigning one waypoint get in nearest. But I will try to fix it.

And I will also try find some solution for empty objects.

Since now only one variable transfers the name of the trigger, delay

a few seconds between the triggers fire
is necessary!

Share this post


Link to post
Share on other sites

Truly excellent work.

However i've got a problem: I have a group which has a "hold" waypoint synchonised to a trigger and then a "move" waypoint. If i don't activate the script the group stays at its designated position, as it should until i activate the trigger. Then the group goes to the "move" waypoint. However if i use the script, the new spawned group will stay put even after i activate the trigger. From what i gather the script doesn't register the synchronisation of the "hold" waypoint to the trigger. Is there any way for me to fix this ?

Share this post


Link to post
Share on other sites

You can name a trigger in the editor and sync the waypoint when the group is created, I guess. I will check that solution and write you a code when I get home.

coming soon

Share this post


Link to post
Share on other sites
You can name a trigger in the editor and sync the waypoint when the group is created, I guess. I will check that solution and write you a code when I get home.

coming soon

But syncronizations done after the mission is loaded (i.e. entering briefing screen) don't work, do they?

Share this post


Link to post
Share on other sites
But syncronizations done after the mission is loaded (i.e. entering briefing screen) don't work, do they?

I don't know... :( It is maybe worth trying, no?

Share this post


Link to post
Share on other sites

I've kind of worked around this issue but in any case i'm grateful for whatever you come up with.

I'm afraid i've got two more questions:

1) Is it possible to stop the spawning of one particular group once it gets underway?

I.E. i have a group spawning 4 times every 90 seconds. After 200 seconds during which the group has spawned twice, a trigger is activated that stops any further spawning of that particular group.

2) Is it possible to have the dead units of a group spawn immediately after their death ?

Unless i'm mistaken right now the spawning takes place only after the entire group dies.

Share this post


Link to post
Share on other sites

Great work ArmAIIholic!!

Simple question: How do you get AI groups to spawn from inside buildings? Everytime I try to spawn on top of building and fall to their death.

I used this command to set their pos and still they spawn on top of building:

{_x setpos [getpos _x select 0,getpos _x select 1, 2700]} forEach units groupName

Any hints?

Share this post


Link to post
Share on other sites

@verde13

1) it is not, since script is running in the background

2) yes, spawning takes place only after the entire group dies

@CaptainBravo

Try this one in the init string of Murk spawn

http://wicta2.wikia.com/wiki/Units_in_Buildings

e.g.

null = [this,"triggername","reset",5,0,"[i]your-string-goes-here[/i]"] execVM "murk_spawn.sqf";

Share this post


Link to post
Share on other sites

Hello. we are using this script to spawn enemy units for coop missions, but we notice that some enemy units are bugged, they dont move, and when you shot them nothing happen also, they dont die, just stay still. It happen a lot and its very annoying. This maybe caused by ACE2

Share this post


Link to post
Share on other sites
how to combine murk and CBA_fnc_taskDefend?

I think that example would be something like this:

null = [this,"trig1","once",0,0,"[b][color="Red"][group this, getMarkerPos "GKB_guer_obj3a", 15, 0] spawn CBA_fnc_taskDefend[/color][/b]"] execVM "murk_spawn.sqf";

You put it between quotes for init line for a leader.

Nice finding btw.

Share this post


Link to post
Share on other sites
Hello. we are using this script to spawn enemy units for coop missions, but we notice that some enemy units are bugged, they dont move, and when you shot them nothing happen also, they dont die, just stay still. It happen a lot and its very annoying. This maybe caused by ACE2

Aparently the problem is caused by Zeus AI

Share this post


Link to post
Share on other sites
---

Or it could be missing AI center?!?

If you are using loader you have to put dummy groups or put (something like) this in init.sqf

// Creating all centers, so you don't have to place "dummy" units
WEST = createCenter WEST;	
EAST = createCenter EAST;
GUER = createCenter RESISTANCE;
CIV = createCenter RESISTANCE;
/* Making friends ? :) nooo, enemies */
WEST setFriend [EAST, 0];
EAST setFriend [WEST, 0];
EAST setFriend [GUER, 0.2];
GUER setFriend [EAST, 0.2];

Share this post


Link to post
Share on other sites

I am trying to get this to work with UPSMON , It all works Great but not with the loader I get a missing "]" message in the error ?

Any idea why it will not work with teh loader but works without ?

nul = [this,"triggertower","once", 1, 1, 'nul=[this,"marker_tower","showmarker","delete:",200] execVM "scripts\UPSMON.sqf"'] execVM "murk_spawn.sqf";

This is what the capture generates:-

[[[["RU_Soldier_SL",[7878.79,4666.58,0],195.409,"",0.6,"LIEUTENANT",["AK_107_pso","ItemGPS","Binocular","NVGoggles","ItemMap","ItemCompass","ItemWatch","ItemRadio","Makarov"],["30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","30Rnd_545x39_AK","HandGrenade_East","HandGrenade_East","SmokeShell","SmokeShell","SmokeShellOrange","SmokeShellBlue","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov"],[]]],EAST,[[[7878.79,4666.58,0],-1,"UNCHANGED","NO CHANGE",0,"","NO CHANGE","","NEVER","UNCHANGED",["true",""],[0,0,0],"MOVE"]],"triggertest","once",1,1,"nul=[this,"marker_chal","showmarker","track","delete:",200] execVM "scripts\UPSMON.sqf"",120]]

Looks like I get the same message if i use House patrol script as well , can I use a script inside or is this nor a feature that will work with the loader ?

Edited by psvialli
update

Share this post


Link to post
Share on other sites

OK guys this Does work so to use this script with UPSMON:-

nul = [this,"triggertname","once", 1, 1, "nul=[this,'marker_mame','showmarker','delete:',200] execVM 'scripts\UPSMON.sqf''] execVM "murk_spawn.sqf";

UPSMON must be between " " not ' ' :)

---------- Post added at 09:46 AM ---------- Previous post was at 09:44 AM ----------

Found a little issue you might want to look at this does not work on Qom province !

For some reason they go to there set WP then wait for 5 sec then the all run to the bottom left corner of the MAP ! ?

Edited by psvialli

Share this post


Link to post
Share on other sites

Is there any way to make a vehicle spawn with units in it.

Example: I need to spawn an APC full of soldiers to come to me and unload.

Share this post


Link to post
Share on other sites

Just realised the Delete does not seem to work, the groupd should delete after they are all killed after 120 sec -but they do not , anyone eles having this issue ?

Share this post


Link to post
Share on other sites
{deleteVehicle _x} forEach units _Group;  // Delete the members of the group
deleteGroup _Group;  // Free up the group slot.

Share this post


Link to post
Share on other sites

nul = [this,"triggertname","once", 1, 1, "nul=[this,'marker_mame','showmarker','delete:',200] execVM 'scripts\UPSMON.sqf''] execVM "murk_spawn.sqf";

UPSMON + Murk_Spawn

errors in the editor

This one will work. UPSMON + Murk_Spawn.

Keep in mind my file paths are different than what you will be using, as well as various array perams in the given scripts.


nul = [this,"trigger_0","once",1,1,'nul = [this,"area0"] execVM "scripts\UPSMON.sqf"'] execVM "scripts\enemy_spawn\murk_spawn.sqf";

This fully works, however it appears when the units spawn, they are slightly glitched. UPSMON issues them way points however they are unable to move. UPSMON then thinks the units are stuck, and issues them a run command. After that, everything works as intended. It takes about 60 seconds for that to happen though, so make sure your trigger spawns are a good distance away.

Edited by Skelt

Share this post


Link to post
Share on other sites

Thank you for this script. Well done indeed.

Does anyone know if it can be used with animals. My capture shows up the units as "unknown" with very little infor for each animal. Thanks again.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×