Forum Jump :

Author Message


Posts: 166
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 35
In-game name: SPUn

 
#1 Posted at 2013-09-07 13:59        
     

[BETA] AIRS - AI Respawn System

1.0


Description:

This script pack makes AI group to respawn on defined marker(s) after spawning delay and sends it for its task. It's group based, so spawning delay starts running after whole group is dead. It's ment for multiplayer missions, but can also be used for SP.
Works with vehicles too, and has option to set air group to spawn on air or land. Includes simple cleanup script for multiplayer, there's multiple preset tasks you can set for the group and it's quite simple to make your own ones too.

It uses few familiar BIS functions which I've modified a bit to suit better on this (BIS_fnc_taskDefend, BIS_fnc_taskPatrol, BIS_fnc_spawnGroup, BIS_fnc_spawnVehicle).

How to use:

1. Extract AIRS.rar into your mission folder. You should have there now 2 folders; LV and AIRS.
2. Create init.sqf in your mission folder and paste in it:
if(isServer)then{execVM "AIRS\AIrespawnInit.sqf";};
3. Create AI group and set to its leaders init field:
nul = [this,[target,style],lifes,base,delay,air] execVM "AIRS\addAIgroupToPool.sqf";
4. Adjust this calling line with these rules:
  • target - Target object, marker or position, eg: "targetMarker"
  • style - Style/Task, current templates:
    • "attack" - Team attacks to target (using BIS_fnc_taskAttack).
    • "defend" - Team goes and defends the target (using possible static weapons etc). Modified version of BIS_fnc_taskDefend (faster movement and removed sitting!).
    • "patrol" - Team patrols around target (using modified BIS_fnc_taskPatrol (faster movement)).
    • "building" - Team will go patrol inside nearest building (which has buildingPos') from the target.
    • "buildings" - Team units will patrol individually in all buildings in 100m from target.
    • "waypoint" - Team uses waypoint to move to target. As default the waypoint is set up as "SAD" "AWARE" "RED" "FULL". (You can edit this in AIRS\startAItask.sqf)
    • "domove" - Team will move to target using doMove command.
  • lifes - How many times group will respawn (0 = unlimited). DEFAULT: 0
  • base - Spawn marker or array of markers for the group. Use "original" if you want group to respawn to its original spawn position. If array is used, selected marker is picked from it randomly. DEFAULT: "respawn_west" / "respawn_east" / "respawn_guerrila"
  • delay - Spawning delay for the group. If not defined, script will use AIRS_respawn_delay which is defined in AIRS\AIrespawnInit.sqf. DEFAULT: AIRS_respawn_delay (25s)
  • air - Ment for air vehicles, so if group has air vehicles and this is set to true, they will spawn flying, otherwise at land. DEFAULT: false
Example:
nul = [this,["mainTarget","attack"],0,"original"] execVM "AIRS\addAIgroupToPool.sqf";

Files:
Download: AIRS.rar (Includes example mission)
More precise and detailed information: Documentation

Notice:
Most of the files are in AIRS folder, but this pack also includes temporarily LV folder since it uses few functions from AISSP and I'm not 100% sure yet if I should include this to AISSP or keep it separated. LV folder includes AISSP 0.81 files with modified LV_fnc_removeDead.sqf, so if you want to combine these script packs, you should ask some more info how to do it the easy way. With AISSP 0.80 there's no conflicts.

This should suit very well for Conquest type coop missions, but why not for others too.
I hope you'll find it usefull! :)

This post was edited by spunFIN (2013-09-12 09:24, ago)

Need web sites & apps or video effects? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia

Author Message

HazJ  



Posts: 165
Rank:


Level: Member

Country: uk
Location: [0, 0, 1000]
Occupation: Full Stack Developer
Age: 24
In-game name: Haz

 
#2 Posted at 2013-09-07 14:08        
     
Thank you SPUn, your a god... :-)

Dirty Haz

Haz

Advertisement


Author Message


Posts: 20671
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 44
In-game name: Foxhound

 
#3 Posted at 2013-09-11 10:34        
     
Thank you for posting yet another of your work on our forums :-)
Sorry for the delay as well, I was on holiday and while I was there I broke my hand, so updating Armaholic will be slower the next few weeks.

News is up on the frontpage and you can find our mirror here:



Visit my family webshop desteigerhoutshop.nl.

Author Message


Posts: 3
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2013-10-08 15:48        
     
really not understanding the target part. I put the name of a marker, and tried it with target in front of it and a bunch of other nonsense but I just get undefined variable errors every time.


Author Message

HazJ  



Posts: 165
Rank:


Level: Member

Country: uk
Location: [0, 0, 1000]
Occupation: Full Stack Developer
Age: 24
In-game name: Haz

 
#5 Posted at 2013-10-08 18:54        
     
Make sure you have quotes "" around the marker name. The word "target" is not required as well. For an object, you don't have quotes "" around it. Good luck! :-)

Dirty Haz

Haz

Author Message


Posts: 1
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2013-11-05 23:59        
     
I keep getting an error whenever they respawn that says

File A3\functions_f\spawning\fn_taskAttack.sqf, line 26

#9: Default false is type BOOL, must be ARRAY [fx symbol]

I have this on vehicle squads leaders: nul = [this,["test_1","attack"],0,"test_2",1,false] execVM "AIRS\addAIgroupToPool.sqf";


Author Message


Posts: 7
Rank:


Level: Member

Country: ua
Location:
Occupation:
Age:
In-game name:

 
#7 Posted at 2013-12-10 14:00        
     
How to make units respawn with custom equipment with this script?


Author Message


Posts: 166
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 35
In-game name: SPUn

 
#8 Posted at 2014-03-29 17:58        
     
Hey, sorry for being 'away' :)

@Rafael09ED,
Hmm, I don't seem to get that error, and your calling line looks ok. I wonder if that was just some temp issue or if it still exists for you.

@SpeedyGonzales,
For this one I didn't include any simple ways to modify outfit, but you could do it in "spawnGroup.sqf" I think. Probably after line 60 would be good spot to maybe call outfit script which adjusts unit's gear depending on their side etc.
Let me know if you feel like trying or need assistance with it.

Need web sites & apps or video effects? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia

Author Message


Posts: 20
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 48
In-game name: Dale

 
#9 Posted at 2014-09-07 15:32        
     
Can someone please explain how to use an array of markers with this?

I have the following but getting script errors:

nul = [this, ["mkr_target","patrol"], 0, ["sp1", "sp2", "sp3", "sp4"], 300] execVM "AIRS\addAIgroupToPool.sqf";

I am trying to get the AI to spawn at random positions.


Author Message


Posts: 166
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 35
In-game name: SPUn

 
#10 Posted at 2014-09-07 17:39        
     
Hey dale0404,

That line actually looks ok to me. Could you send me your mission folder so I could see what's wrong there? Couple points (tho I'm sure you got these); that line is in init field of group leader? and all those markers does exist?

New re-written version is soon going to be released btw, it will have 'individual respawn', possibility to make AI use empty vehicles, additional init-features, and game modes with tickets, capturable bases, custom hud, and such.

Need web sites & apps or video effects? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia

Author Message


Posts: 20
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 48
In-game name: Dale

 
#11 Posted at 2014-09-07 18:13        
     
Sent buddy and thank you.


Author Message


Posts: 7
Rank:


Level: Member

Country: fj
Location:
Occupation: Pilot
Age: 35
In-game name: Cpl Chip

 
#12 Posted at 2015-03-12 05:54        
     
Scrip works beautifully , ai respawns at exact delay :-D but whenever they do respawn, the message :

#9: Default false is type BOOL, must be ARRAY [fx symbol]

appears at the bottom all the time. Its irritating, do you have any suggestions about how to fix this *DONT_KNOW* ?


Author Message


Posts: 166
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 35
In-game name: SPUn

 
#13 Posted at 2015-03-13 09:31        
     
Hey CaptainSparkles,

That surely sounds annoying! :P I haven't touched this one in very long time, so it's very possible that there's some issues.
Earlier I was planning of releasing AIRS 2.0, and here's actually wip version of it: http://kaartomedia.com/ARMA/AIRS2.Stratis.rar if you want to check it out.
Unfortunately there's no documentation included, so you would have to read some script comments etc (ADD.sqf), but I can also help via Steam.

It's wip as there's many features still missing, like game modes and so on, but the basic stuff should work. And some "new" features:
- you can now choose if AI respawns independently one by one, or as a whole group like before
- easy to define separate init-files, which allows you to for example add your own gear script for AI
- also possible to define if AI uses empty vehicles near it

I really hope I can someday have time to finish this one!

Need web sites & apps or video effects? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia

Author Message


Posts: 3
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#14 Posted at 2015-03-24 16:27        
     
is there a way to have units respawn with the other aspects of their init file? I'm trying to apply a kill counter script and it doesn't load upon respawn. I tested giving them custom outfits then execvming your respawn script and discovered they lost the custom outfits after respawn also.

anyway to get this to store init information? D:


Author Message


Posts: 166
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 35
In-game name: SPUn

 
#15 Posted at 2015-04-01 08:22        
     
Hey kamaitachi96,
Did you try to use init files the same way as the examples I have at "AIRS/UserFiles/" -folder? Seems like I didn't mention anywhere that unit parameter is being passed to additional init files.

Need web sites & apps or video effects? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia





Tags: Ai, Respawn