Jump to content
Murklor

Editor based AI spawn script by trigger

Recommended Posts

This is a really great script, thanks. Hope you keep updating it for OA and beyond. Give it a classy name and start a new thread.

Share this post


Link to post
Share on other sites

Great script, any way of getting it to work with a CRRC though ?

Any ideas anyone?

Edited by Dai-San

Share this post


Link to post
Share on other sites

Hi Murklor,

This script is gorgeous in its beauty and I simply have burning desire to implement it in my module WICT. But I will have to change some things...

Do I have your permission to adapt your script for WICT and make it work with Dedicated server?

Also I want to put in the manual "Powered by..." or something like that, so some Logo or Avatar, or some crazy title except "Editor based AI spawn script by trigger" would be great.

You did your job excellent, now just a little more effort is needed from you, so I can make proper credits in my module.

Best regards and huge respect,

ArmaIIholic

--EDIT--

I already changed it., wasn't so difficult.

I made only one script group.sqf instead of first_group, second_group etc. and I removed dummy groups and waypoints, implementing other method to preserve them.

All I need is your permission now.......

Edited by ArmAIIholic

Share this post


Link to post
Share on other sites

I made a new version of WICT and I wrote proper credits for you Murklor.

If anyone is interested I used this:

_trigger = _this select 4;
_orders = _this select 5;

So for example :

//------------------------------------------------------------------------
// Put the script on hold until the mission is active
while {call compile format ["!%1",_trigger]} do {
sleep WAITING_PERIOD;
};
//------------------------------------------------------------------------

This is how I rewrote sleeping part.

I cut off dummy groups and waypoints and just complied orders :

_compiled = compile _orders;
call _compiled;

Thanx for great script,

Best regards,

ArmAIIholic

Share this post


Link to post
Share on other sites
I made only one script group.sqf instead of first_group, second_group etc.

Hm?

The first_group/second_group sqfs etc was made obsolete from V5 if I recall correctly, that version much improved the script core and compressed it to a more flexible single file, V6 optimized it further on Xenos advice, heh. Download link is some 14 posts up or so.

Oh and you can use it however you want :)

Share this post


Link to post
Share on other sites

Hey Murklor, great script and I use it a lot. Alas I cannot figure out adding the init string. Whenever I do add an init string it doesnt spawn in the objects.

Basically I have a map where I can spawn in a SU-34. The problem is that I need it to fly higher than 100 M, otherwise when it spawns in it usually crashes into the ground because of lack of speed and alt.

nul = [this, triggerfive, "reset", 0, 5, 'this setpos [(getpos this select 0), (getpos this select 1), 1000];'] execVM "murk_spawn.sqf";

Is what I have tried using but like I said, it doesnt spawn in after activating the trigger. This works if I take out the init string...cept for the whole crashing into the ground thing.

I have alot put this flyinheight 1000 in the aircraft's waypoints but it seems to ignore that init.

Share this post


Link to post
Share on other sites

got it, was using V5, works with V6.

and used a different init using getposasl

Edited by _S2_

Share this post


Link to post
Share on other sites

Great script!

I know I wont get a answer from Murklor but maybe somebody has a idea.

I am trying to get a squad to spawn using the murk_spawn.sqf. I want them to spawn in certain building positions and stay in that position. IE... on a balcony or rooftop. I have the building ID and position numbers, and using this code in the init of the individual soldiers:

this setPos ((position this nearestObject 8389) buildingPos 8); this disableai "MOVE";

the code for the sqd ldr is

nul = [this,trigger1,"once"] execVM "murk_spawn.sqf";

The spawn is working great till I place a couple of soldiers in a building with the setPos command. This causes the spawns to double! I get two soldiers at the position instead of one, and one stays the other moves away...

Any fix?

Share this post


Link to post
Share on other sites

Have you tried specific names and using the script squadleader init instead?

nul = [this,trigger1,"once",1,1,"your_sl_init_string_here"] execVM "murk_spawn.sqf"; (1,1 is just default values)

Ie you use "U1 setPos ((position U1 nearestObject 8389) buildingPos 8); U1 disableai 'MOVE';" etc.

Share this post


Link to post
Share on other sites

I am new to all this, please explain "your_sl_init_string_here"

nul = [this,trigger1,"once",1,1,"your_sl_init_string_here"] execVM "murk_spawn.sqf";

What do I place there?

---------- Post added at 09:36 AM ---------- Previous post was at 08:20 AM ----------

I tried this by renaming unit "u1", and the units did not despawn at start

nul = [this,trigger1,"once",1,1,"u1 setPos ((position this nearestObject 8389) buildingPos 8)"] execVM "murk_spawn.sqf";

---------- Post added at 10:19 AM ---------- Previous post was at 09:36 AM ----------

I have this working for the moment, thanks Murklor, this is a great script.

nul = [this,trigger1,"once",1,1,"u1 setPos ((position this nearestObject 8389) buildingPos 8)"] execVM "murk_spawn.sqf"; this disableai "MOVE";

The units spawn at start then despawn correctly. On trigger they spawn on location and stay put..... awesome! :yay:

Edited by McSpuds

Share this post


Link to post
Share on other sites

OK, now I have a whole new problem.

I use Murklor's respawn and I use Norrin's revive script.

I am using both of these scripts in missions and they work great. But if I put them both in the same mission the murk_spawn.sqf will not work.

Any suggestions?

Share this post


Link to post
Share on other sites

Excellent script! Only question is if I want to span the group from inside a building, they will always spawn at the roof and fall to their death.

How do you get the whole group do spawn inside ground floor, I guess I am asking how to setPos for the whole group

Thanks for any answers.

Share this post


Link to post
Share on other sites
Excellent script! Only question is if I want to span the group from inside a building, they will always spawn at the roof and fall to their death.

How do you get the whole group do spawn inside ground floor, I guess I am asking how to setPos for the whole group

Thanks for any answers.

use this code along with the "visual house id" mod listed below. The MOD is a must have tool.

nul = [this,triggername,"once",1,1,"unitname setPos ((position this nearestObject 8389) buildingPos 8)"] execVM "murk_spawn.sqf"; this disableai "MOVE";

http://www.armaholic.com/page.php?id=11288

hope this helps

---------- Post added at 10:05 AM ---------- Previous post was at 10:05 AM ----------

although I know it works for individual units, not sure about groups.

Share this post


Link to post
Share on other sites
use this code along with the "visual house id" mod listed below. The MOD is a must have tool.

nul = [this,triggername,"once",1,1,"unitname setPos ((position this nearestObject 8389) buildingPos 8)"] execVM "murk_spawn.sqf"; this disableai "MOVE";

http://www.armaholic.com/page.php?id=11288

hope this helps

---------- Post added at 10:05 AM ---------- Previous post was at 10:05 AM ----------

although I know it works for individual units, not sure about groups.

Thanks McSpuds,

I responded back. Works for leader but rest of squad spawns on roof.

Any command in leader init fieldto setpos for whole group?

Share this post


Link to post
Share on other sites

I had to break my squads down and use it for individual units. Took a lot of doing but she works.

My problem that I can not get to work is the murk_spawn.sqf and the Norrin Revive script. They have a conflict someplace and will not work together.

Share this post


Link to post
Share on other sites
Thanks McSpuds,

I responded back. Works for leader but rest of squad spawns on roof.

Any command in leader init fieldto setpos for whole group?

maybe use foreach command.

{_x setPos ((position this nearestObject 8389) buildingPos 8)} forEach Units Group this

nul = [this,triggername,"once",1,1,"{_x setPos ((position this nearestObject 8389) buildingPos 8)} forEach Units Group leadername"] execVM "murk_spawn.sqf"; this disableai "MOVE";

Share this post


Link to post
Share on other sites

is there an issue with the patch 1.55 and this script, i say this because before the patch my mission was working fine, all AI were spawning when the triggers were set off, now after the patch its like the script isnt working?? i tried the origianal test mission and it seems to be broken, the AI just spawn with been activated, however the vehicle spawning seems to work??

great script btw, just need to fix this

cheers

Share this post


Link to post
Share on other sites
Rodders;1791875']is there an issue with the patch 1.55 and this script' date=' i say this because before the patch my mission was working fine, all AI were spawning when the triggers were set off, now after the patch its like the script isnt working?? i tried the origianal test mission and it seems to be broken, the AI just spawn with been activated, however the vehicle spawning seems to work??

great script btw, just need to fix this

cheers[/quote']

I can confirm that it worked nicely with 1.54, have not tried it with 1.55.

I discarded this great script since it was not compatible with norrin revive.

If the author can get it to work with norrin revive script, ill definetly start using it again, its just so easy and simple, like plug and play.

Share this post


Link to post
Share on other sites
I can confirm that it worked nicely with 1.54, have not tried it with 1.55.

I discarded this great script since it was not compatible with norrin revive.

If the author can get it to work with norrin revive script, ill definetly start using it again, its just so easy and simple, like plug and play.

i agree, but i had it working with the revive script, so not sure whats going on, ill test some more, but sure its to do with the new patch :icon_wink:

Share this post


Link to post
Share on other sites
Rodders;1792577']i'm trying to get hold of the author for this' date=' how can i do that??[/quote']

Click on his name in forum posts and send message either PM or email

Share this post


Link to post
Share on other sites
OK, now I have a whole new problem.

I use Murklor's respawn and I use Norrin's revive script.

I am using both of these scripts in missions and they work great. But if I put them both in the same mission the murk_spawn.sqf will not work.

Any suggestions?

right i now know why this script wasnt working for me, i had a tracer mod running and for some reason it stopped the script working properly, now all is working fine EVEN WITH NORINS REVIVE!!!! :yay:

Share this post


Link to post
Share on other sites

If i use this do the groups count on the Map and what is the limit of OPFOR I can place on the map ?

I am sure I read a buffer size of 254 is that cortrect , if so what is the workaround ?

Share this post


Link to post
Share on other sites

does it works with UPSMON?

I tried to spawn a group of soldiers with a trigger and then wait if they go as a reinforcement, but Im such a no0b and I dont know if im doing it wrong or it just doesnt work

this is what I put in the init, is more likely that I'm doing it wrong :386:

nul = [this,"once"] execVM "spawn_groups\fourth_group.sqf";

nul=[this,"town2", "nomove","reinforcement:",2, "delete:",600] execvm "scripts\UPSMON.sqf";

and this in the trigger

KRON_UPS_reinforcement2= true; fourth_group = true;

Share this post


Link to post
Share on other sites

Editor based AI script by trigger v7 :

V7 (ArmAIIholic)

- Added GameLogic center to reduce number of dummy groups at the beginning, and in modes repeated and reset ***

- Changed beginning scope to isServer, rather than using exitWith

- Shortened initializing trigger part in init.sqf

- Added original instructions and examples, adapted for v7

- SQM is from v5 with some groups added

- Functions module is not needed, but I placed it anyway (habit when making missions)

This is report from arma2.RPT :

"Number of groups : 8"

"Number of groups : 8"

"Number of groups : 8"

"Number of groups : 8"

"Number of groups : 8"

"Number of groups : 8"

"Number of groups : 8"

"Number of groups : 8"

"Number of groups : 7"

"Number of groups : 6"

"Number of groups : 5"

"Number of groups : 4"

"Number of groups : 3"

"Number of groups : 2"

"Number of groups : 1"

*** in this way you can use Editor based AI script by trigger with any other addon that has dynamically created groups -- GameLogic groups are not listed as groups with allGroups, therefore they are not affecting performance!

I also checked arma2.RPT and there are no errors regarding this script (tested in editor).

I will include this in next WICT release.

Download links :

http://www.megaupload.com/?d=5VHLI1XS

http://www.mediafire.com/?thwmjgope9fiaiq

http://rapidshare.com/files/448926602/spawn_exampleV7.utes.zip

---UPDATE---

Armaholic is also updated thanx to Foxhound!

Edited by ArmAIIholic

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

×