Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: move to random marker wp script

  1. #1

    move to random marker wp script

    Hi,

    This is a hard one for me and can't seem to get it to work:

    I am using a respawn script for ai groups and let them move to markers placed inside towns using a waypoint script. I have several towns that need to be captured by the AI, opfor and blufor. I made the markers color red when opfor has seized a town, and blue when blufor seizes.

    Now, when the ai respawns after they all have been killed I want them to immedeately move to one of the towns that are not captured yet, random.
    So for blufor this must be something like: when markercolor blue, do not move to town. When markercolor red, possible town to move to.
    I want them to move to one of (random) the towns that are not captured yet.

    Who can help me out here a bit and maybe post a smal example wp script to get me started.
    thx

  2. #2
    Warrant Officer Demonized's Avatar
    Join Date
    Nov 16 2010
    Location
    Back from afk 2013
    Posts
    2,614
    asuming you are using a script for respawning AI, place this in where the ai is spawned:
    Code:
    _null = _this_is_group_OF_respawned_AI execVM "engageTowns.sqf";
    place function module on map.

    engageTowns.sqf
    Spoiler:


    here is info on the automatic patrol script:
    http://community.bistudio.com/wiki/BIS_fnc_taskpatrol

    here is info on creating waypoints yourself instead:
    http://community.bistudio.com/wiki/addWaypoint
    My scripts:
    Spoiler:

    what to do when posting any kind of code dammit!!

    Any new mission editor or scripter in Arma2 should have read Mr Murrays Editing Guide Deluxe at least once, it still applies for A2 even though it was made for Armed Assault.

  3. #3

    engageTowns.sqf

    looks like a nice script

    i just cant get the script to work.any way for you to make this script

    a demo mission (like to use this script for mp.and the AI is placed in editor

  4. #4
    Warrant Officer Demonized's Avatar
    Join Date
    Nov 16 2010
    Location
    Back from afk 2013
    Posts
    2,614
    reworked script, using a very primitive respawn.

    Demo mission OA required

    Edit: Link updated with vehicle fix.
    Last edited by Demonized; Jan 13 2012 at 12:29.

  5. #5

    Happy X-mas

    Thank you!
    For helping me out and for making this possible for me. Happy X-mas and a happy new year!

  6. #6
    That is a very cool script Demonized!

  7. #7
    Im using this script quite a bit... can i please request vehicle support for mechanized or motorized groups... or vehicles in general?

    Currently using Zonekiller's AI Vehicle Control System it works except i think its a bit hit and miss at times if AI spawn before vehicle and then move off on foot.
    Last edited by Katipo66; Jan 13 2012 at 03:28.

  8. #8
    Warrant Officer Demonized's Avatar
    Join Date
    Nov 16 2010
    Location
    Back from afk 2013
    Posts
    2,614
    Quote Originally Posted by Katipo66 View Post
    Im using this script quite a bit... can i please request vehicle support for mechanized or motorized groups... or vehicles in general?

    Currently using Zonekiller's AI Vehicle Control System it works except i think its a bit hit and miss at times if AI spawn before vehicle and then move off on foot.
    There was an issue with vehicles, tusk, bradley maybe more when using BIS_fnc_taskPatrol.
    It appears that when beheaviour and speed was not set for each created waypoint these groups never moved, maybe due to me removing all waypoints prior to calling the function, so the creation from BIS_fnc_taskPatrol had no reference to work with.

    Anywho, included a modified version of BIS_fnc_taskPatrol as a function in the script, all working now.
    Demo mission OA required
    Edit: also includes vehicle respawn for groups.
    Last edited by Demonized; Jan 13 2012 at 22:58.

  9. #9
    Awesome!! thanks a lot man

  10. #10
    Warrant Officer Demonized's Avatar
    Join Date
    Nov 16 2010
    Location
    Back from afk 2013
    Posts
    2,614
    Forgot to include vehicle respawn, have added that now and updated download link.
    Edit: Also added a bonus in top of script
    Last edited by Demonized; Jan 13 2012 at 23:07.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •