Jump to content
Murklor

Editor based AI spawn script by trigger

Recommended Posts

It means you made some mix of old and new version :(

<no shape> is why triggers are activated now via

catch_trigger = "trigger_name"; publicVariable "catch_trigger ";

you are using old method for triggers - check examples in v8. Example from demo_1:

[west,"HQ"] sideChat "TRIGGERING ONE"; catch_trigger = "triggerone"; publicVariable "catch_trigger";

Cheers

Share this post


Link to post
Share on other sites

Thanks , yes I was updating an old version so ill just rename them all in the editor and do it again.

Cheers and love the update will make it much quicker !

---------- Post added at 09:56 PM ---------- Previous post was at 08:43 PM ----------

ok I have updated all my triggers to

catch_trigger = "trigger_name"; publicVariable "catch_trigger ";

But now i get :-

[]]] ?

Any idea why i am getting this now ?

Share this post


Link to post
Share on other sites

Try starting from v8 and then building your game. I have no idea what kind of mix of the files you made and where could be the catch.

Does demo_1 and demo_2 work without problem? If they work properly that is solution for your problem --- you made inappropriate mix of missions.

If they don't work, that is problem for me, I will have to test them again.

Do you have catch_trigger initialized to none in init.sqf? catch_trigger = "none";

BTW I tested solution for placement radius and here is working fix:

In the script of, for example, first waypoint you put this :

[(group this), 2] setWaypointPosition [(waypointPosition [(group this), 2]), 50];

it will set up a new position for the waypoint number 2 when waypoint number 1 is completed.

Edited by ArmAIIholic

Share this post


Link to post
Share on other sites

Yes all demo's, work and if i create a new mission it also works , must have something in the old mission that is causing the issue !

Thanks for the placement radius update :) BTW can you give us a full example for the radius ?

Edited by psvialli

Share this post


Link to post
Share on other sites

Yeah, but I have a small correction for placement radius.

You will have to put it in init string in the call.

Full example :

null = [this,"t1","wave",5,60,[b][color="Red"]"[/color][/b][i][(group this), 2] setWaypointPosition [(waypointPosition [(group this), 2]), 50];[b][color="Red"]"[/color][/b]] execVM "murk_spawn.sqf[/i]";

Share this post


Link to post
Share on other sites

Hey psvialli, sorry man, I will have to make some update to files to make placement radius really work. Coming ASAP.

---------- Post added at 11:17 AM ---------- Previous post was at 11:11 AM ----------

Editor based AI script by trigger v8b :

hotfix :

-- placement radius workaround is now properly working (thanx to psvialli persistence)

http://www.mediafire.com/?22kerezt2qpj5kz

Edited by ArmAIIholic

Share this post


Link to post
Share on other sites

:) thanks will download now !

Do we still need to use the following for it to work or is it now all in the loader?

null = [this,"t1","wave",5,60,"[(group this), 2] setWaypointPosition [(waypointPosition [(group this), 2]), 50];"] execVM "murk_spawn.sqf";

Share this post


Link to post
Share on other sites

Yes! What I've fixed is that waypoints are created before init line for leader is executed, so now changing position of the waypoint works properly.

I tested it with hint displaying waypoint position after the changed which looks like this (you can try it to test it) :

null = [this,"t1","wave",5,60,"[(group this), 2] setWaypointPosition [(waypointPosition [(group this), 2]), 50]; [i]hint format ['Waypoint position is: %1',(waypointPosition [(group this), 2])[/i]]"] execVM "murk_spawn.sqf";

everytime you run the game you will see different position for a waypoint.

And that will be also copied to Clipboard. Problem solved!

ArmAIIholic is RTB.

Share this post


Link to post
Share on other sites

Nice one !!!

Come up with another little issue please dont pull your hair out :)

Trigger

catch_trigger = "triggerpalace"; publicVariable "catch_trigger"

Init of sniper to be set in a tower and use Guardpost - worked fine in old version. - no waypoints.

nul = [this,triggerpalace,"once",1,1,"this setPos ((position this nearestObject 496833) buildingPos 1)",'guard=[this,360,"SAFE","UP",true] execVM "GuardPost.sqf"'] execVM "murk_spawn.sqf";

this is what i get on clipboard

[[[["TK_Soldier_Sniper_EP1",[6824.68,6409.01,0],0,"",0.6,"LIEUTENANT",["SVD_des_EP1","NVGoggles","Binocular","ItemMap","ItemCompass","ItemWatch","ItemRadio","ItemGPS"],["10Rnd_762x54_SVD","10Rnd_762x54_SVD","10Rnd_762x54_SVD","10Rnd_762x54_SVD","10Rnd_762x54_SVD","10Rnd_762x54_SVD","10Rnd_762x54_SVD","10Rnd_762x54_SVD","HandGrenade_East","HandGrenade_East","SmokeShell","SmokeShellBlue"],[]]],EAST,[[[6824.68,6409.01,0],-1,"UNCHANGED","NO CHANGE",0,"","NO CHANGE","","NEVER","UNCHANGED",["true",""],[0,0,0],"MOVE"]],any,"once",1,1,"this setPos ((position this nearestObject 496833) buildingPos 1)","guard=[this,360,"SAFE","UP",true] execVM "GuardPost.sqf""]]

I get "Any" for the trigger name?

Do they need to be groups or can i use single men ?

Any idea why i am getting this ?

Edited by psvialli

Share this post


Link to post
Share on other sites

null = [this,"triggerpalace","once",1,1 etc.etc.etc.

trigger_name is a string :)

you just need quote marks :cool:

Edited by ArmAIIholic

Share this post


Link to post
Share on other sites

OMG what an idiot i looked at that soooo many times !!!!

I am on Lingor, think that might be the issue , as single men do not seem to get anything

i get [] for them :(

Groups work fine !

Share this post


Link to post
Share on other sites
as single men do not seem to get anything

i get [] for them :(

I am using it on single units without problem :confused:

Share this post


Link to post
Share on other sites

I think it is a bad day for me , ill leave it and come back tomorrow sometimes it's best to walk a way for a while, Thanks for all your help and ill update tomorrow.

:)

Share this post


Link to post
Share on other sites

Ok, simple solution -- try it with v8 -- if you can get single unit spawned, then it is not a bug. I currently don't have time to test it, but I am using same script on Duala without problem.

Ask if you need anything.

Cheers

Share this post


Link to post
Share on other sites

OK I have been testing a little more, and it looks like it is the copy to clipboard part that is having the issue, and not the spawnas that works eveytime.

Is there a limit to the trigger name ?

If i use "triggerpalace" i get [] in clipboard if i use"triggerone" i get the full lot in clipboard.

But both spawn fine each time.

have ameded all trigger to be short i.e pvtask1, pvtask2 and it works graet with latest !

Edited by psvialli

Share this post


Link to post
Share on other sites

yeah I worked only with short trigger names so far, but I doubt it is the difference between triggerpalace and triggerone... I will test it and let you know.

--EDIT--

I tried with longer names, but everything worked fine.... Just tested on v8. Changed both "triggertwo" for tanks and "triggertwo" in trigger activation for "triggerpalace" and "triggerpalace777777". Dunno man what you are doing... I've got it working + Clipboard.

Edited by ArmAIIholic

Share this post


Link to post
Share on other sites

Hi ArmAIIholic,

Is there any chance I can send you this pbo for you to have a little look at !?

I can get the copy to clip working , past it in loader then take them out of the editor and they no longer spawn in ?

Could it be Lingor ?

Share this post


Link to post
Share on other sites

I don't have time right now, barely have time to do this beside University studying.

But I can assure you it isn't a map --- it is centers that Lingor's units use.

Put in your init.sqf

GUE = createCenter RESISTANCE;
CIV = createCenter RESISTANCE;

Do you understand what you have to do? (I think I already created west and east, don't have scripts in front of me)

When loaded via loader they don't have AI center. Or you can place one unit and make presence probability 0.

Try either one of these solutions and let me know how it is going.

Share this post


Link to post
Share on other sites

Hi ,

Thanks for the reply , I allready have them on the map set to 0, so do not think it can be that.:confused:

Maybe the loader just does not like other scripts running inside I think ill stick to the original as that works like a charm and ill have some hair left.

thanks anyway

Share this post


Link to post
Share on other sites
1) I've tried to do by placing " nul = [this,"triggerfour","once",0,0, ] execVM "murk_spawn.sqf";" in the "on deactivation" in the trigger; But it doesn't seem to work; I replaced the "this" with the name of the group leader but that didn't seem to work. I also tried to define the group leaders in the

by placing the following on the orginal group leader:

nul = [this,"triggerfour","once",0,0, "first1 = this "] execVM "murk_spawn.sqf";

still have not been able to get it to work, I must messing up the code some how.

Well, I have got it so the squad spawns when Blue forces are present and they are disappear when not present. So I can use it for spawn tool to take the load off the server. What I need now is to have the units damage loaded, so that if a unit runs into the enemy and breaks contact, and then comes back to the area, the enemy unit has the same amount of damage as the last contact. How can I do this? I would also like to be able to load regular objects in so I can spawn mines, fortifications and other objects in the same way. Can you help me with this?

Share this post


Link to post
Share on other sites

@Weaponx I will have in mind your request. I cannot guarantee anything, since I have plenty things to do. I will let you know if I come to any solution, you have my word.

Share this post


Link to post
Share on other sites

Really cool script, but I can't figure it out=( For example: I have a squad of independent side troops with leader's name "enemy1" & a trigger set for opfor presence. What should I do to spawn "enemy1" squad on trigger activation? Any help would be appreciated=)

EDIT: A "step by step" instruction would be nice to have in the 1st post.

Share this post


Link to post
Share on other sites

Open murk_spawn.sqf you have everything there at the beginning.

Trigger On Act(ivation) field:

catch_trigger = "triggername"; publicVariable "catch_trigger";

Enemy1 init line :

null = [this,"triggername","once"] execVM "murk_spawn.sqf";

The first post is not mine, so I cannot edit it...

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

×