Page 1 of 5 12345 LastLast
Results 1 to 10 of 41

  Click here to go to the first Developer post in this thread.  

Thread: RUIS - Random Unit Invasion Script

  1. #1

    RUIS - Random Unit Invasion Script 1.2

    Here is something i recently finished.

    This script randomly spawns enemy units in a random position (or positions) you define. These newly created groups will then move to a waypoint location that you specify as well.

    The types of forces this script spawns are random with a percentage chance of being spawned. For example, Infantry might always spawn (100% chance) but the number of groups that are spawned may differ (random of max 10 groups - you can define this as well inside the script)

    so you can specify and customize whatever types of units you want it to spawn, it supports custom factions as well, all you have to do is add that faction classname into the script (template already inside), and fill the arrays with the classnames of the groups there (individual units will not work)

    You can adjust the amount of waves the script will produce (1 wave = 1 iteration of the script spawning stuff)

    You can also adjust the timer before a new wave begins (old units that are alive will still stay on the field, but dead units and empty groups will be deleted to preserve cpu and space) - thanks demonized for the empty group feature

    This script is Multiplayer compatible, works with both dedicated and listen servers (however the host will probably be lagging quite a bit with this script)


    How to Use:

    nul = [RUguy, [spawn1, spawn2, spawn3], attackwp, spawntimer, Scripttime] execVM "RUIS.sqf"

    where:
    RUguy - The name of a unit on the field, the script will take this units faction and side and spawn units of this type, works with BIS_US, USMC, RU, TAKI_INS, and Taki Army

    [spawn1, ..... ] - the spawn locations on the map (best to use gamelogics with names here)

    attackwp - an object or gamelogic where the units spawned will move to
    spawntimer - the amount of time to wait before spawning new units (in seconds)
    Scripttime - the amount of waves you wish the script to run


    link:
    mission example (UPDATED**):http://www.mediafire.com/?0wye5wxtgt69z47

    Script:
    Spoiler:

    maybe some people will make use of this - I know ive needed this a few times
    Last edited by Igneous01; Jul 31 2011 at 19:02.

  2. #2
    Warrant Officer Demonized's Avatar
    Join Date
    Nov 16 2010
    Location
    Back from afk 2013
    Posts
    2,614
    cool, checking it out.
    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
    forgot to credit you with the delete group problem i was having.

    there::

    now you are officially credited \o/

  4. #4
    Hm - Am I doing something wrong...? - no enemies in sight, just the VERY annoying 'pings' from the hints... - were're all the enemise...? - nothing happens... :|
    "Retreating? Hell no, we're advancing in a different direction!" -- Marine Corps General, O. P. Smith

  5. #5
    Quote Originally Posted by Major Woody View Post
    Hm - Am I doing something wrong...? - no enemies in sight, just the VERY annoying 'pings' from the hints... - were're all the enemise...? - nothing happens... :|
    Really debug messages should be in text instead of hints. Any anything that repeatedly hints *must* use hintSilent. Either make that optional or remove it entirely.

    I'm not seeing the script checking for and creating if necessary a center, so it's possible it won't work unless preexisting units of the side are already on the map. So either place people on the map first, or have the script check for a center to have been created first.

  6. #6
    yes - my mistake not removing those annoying hints. This was made as more of a modifiable script then a finished product.

    Currently a preexisting unit must be place in the editor and used for the script. I may change this when I have time to edit the script again

  7. #7
    How can I remove the text that pops up at the top right?

    Thanks in advance

    -Bigshot

  8. #8
    Int last part of the script change this:

    Code:
    waitUntil {sleep 1; _temptime = _temptime - 1; hint format ["timeleft: %1", _temptime]; _temptime < 1};
    to this:

    Code:
    waitUntil {sleep 1; _temptime = _temptime - 1; _temptime < 1};

  9. #9
    Will that also make the AI spawn immediately? Or will it wait the 300 seconds?

    Oh and I think I got the sidechat text gone but I'm not sure

  10. #10
    You could also just change the hint to hintSilent too.

Page 1 of 5 12345 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
  •