Jump to content
Sign in to follow this  
ravennx

Spwan AI With Waypoints

Recommended Posts

Hello everyone.

I'm Looking for a script that Spawns AI with waypoints.

This is for MP, To keep server load down i want to be able to spawn AI at a certian point.

I have seen Spawn scripts before but i cant find one that allows waypoints. Any help here would be great.

And one more thing.. Saw some posts on Limiting Actions such as the Arty Script. HOw would I go about Limiting it per time based. Example 3 per hour.

Does This work in Arma as well?

player addAction ["Action menu", "script.sqs"]

One other thing, this might be a noob question.. How would i setup Default weapons and equipment for a certain spawn.

Thanks in Advance.

RavennX

Share this post


Link to post
Share on other sites

Hi ravennx,

I made a couple of example missions with scripts a while back that may be of help, you can read about them in these threads.  They allow the respawning of both troops and their vehicles

The first one is for if you want to create the waypoints yourself:

http://www.flashpoint1985.com/cgi-bin....=norrin

The second one is for if you want to use the Kronzky's UPS script with your respawning AI.

http://www.flashpoint1985.com/cgi-bin....=norrin

I haven't really tried this since 1.08 but they should still work.  I must warn you they are not very user friendly so you'll need to understand a little scripting and a couple of people have claimed they get server slowdown when the units respawn.  I haven't seen this myself but I've never respawned more than about 12 units at a time.

Another thing to try would be, I think, Myke's 'group respawner script'.

Anyway if you run into probs let me know and I'll try and help you sort it out.

norrin

Share this post


Link to post
Share on other sites
The second one is for if you want to use the Kronzky's UPS script with your respawning AI.

OP did say in his post that his question relates to multiplayer and UPS is far from MP safe. It's a shame because it's cracking script but it's for single player only.

Share this post


Link to post
Share on other sites

This script is very nice thanks Norrin, however I'm looking for a simple script that spawns AI once then goes to a marker POS

I have learned a lot on scripting over the last 3 days... But I'm having a hard time finding this simple script.

Actually I wrote this Script and its working good.

Quote[/b] ]; *****************************************************

; ** Armed Assault Script File

; *****************************************************

group1 = createGroup east

group2 = createGroup east

group1 createUnit ["SoldierESniper",getMarkerPos "ai", [], 0, "FORM"]

group1 createUnit ["SoldierAT",getMarkerPos "ai", [], 0, "FORM"]

group1 createUnit ["SoldierEB",getMarkerPos "ai", [], 0, "FORM"]

group1 createUnit ["SoldierEMG",getMarkerPos "ai", [], 0, "FORM"]

group1 createUnit ["SoldierESniper",getMarkerPos "ai", [], 0, "FORM"]

group1 createUnit ["SoldierAT",getMarkerPos "ai", [], 0, "FORM"]

group1 createUnit ["SoldierEB",getMarkerPos "ai", [], 0, "FORM"]

group1 createUnit ["SoldierEMG",getMarkerPos "ai", [], 0, "FORM"]

_brdm= "BRDM2" createVehicle position ai,group2;

"SoldierECrew" createunit [position ai,group2,"driver1 = this", 1, "PRIVATE"];

"SoldierECrew" createunit [position ai,group2,"driver2 = this", 1, "PRIVATE"];

driver1 moveindriver _brdm;

driver2 moveInGunner _brdm;

_bmp= "BMP2" createVehicle position ai,group2;

"SoldierECrew" createunit [position ai,group2,"driver3 = this", 1, "PRIVATE"];

"SoldierECrew" createunit [position ai,group2,"driver4 = this", 1, "PRIVATE"];

driver3 moveindriver _bmp;

driver4 moveInGunner _bmp;

_t72= "T72" createVehicle position ai2,group2;

"SoldierECrew" createunit [position ai2,group2,"driver5 = this", 1, "PRIVATE"];

"SoldierECrew" createunit [position ai2,group2,"driver6 = this", 1, "PRIVATE"];

"SoldierECrew" createunit [position ai2,group2,"driver7 = this", 1, "PRIVATE"];

driver5 moveindriver _t72;

driver6 moveInGunner _t72;

driver7 moveInCommander _t72;

_waypoint0 = group2 addWaypoint [getMarkerPos "wp", 0]

_waypoint0 setWaypointType "SAD"

_waypoint0 = group1 addWaypoint [getMarkerPos "wp", 0]

_waypoint0 setWaypointType "SAD"

Thanks man!

RavennX

Share this post


Link to post
Share on other sites

Looks really good m8.  My only suggestion is that you may want to put a short sleep (~0.5) between each createUnit command as it may place less strain on the server when all the units are created.

eg.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">group1 createUnit ["SoldierESniper",getMarkerPos "ai", [], 0, "FORM"]

~ 0.5

group1 createUnit ["SoldierAT",getMarkerPos "ai", [], 0, "FORM"]

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
Sign in to follow this  

×