Results 1 to 6 of 6

Thread: A couple of scripting issues

  1. #1

    A couple of scripting issues

    Hi, i wonder how can I script these things in Arma, (If possible):

    1) Can I make a script that will spawn satchel charges on certain places that can latter be touched off by someone? Not to make a unit place them, but rather to spawn them immediately via a script, owned by a certain unit (he can detonate them).

    2) How do I prevent the player from exiting (ejecting) from a vehicle if I don't want him to do so, before a, say, certain waypoint is reached? I want to remove this option from his action menu.


  2. #2
    1) I am pretty sure it is impossible to actually spawn a "live" satchel charge from the editor but what you can do is make the unit in question place the satchel once the mission starts.
    you can do this by placing a waypoint (on the spot where you want the satchel) and in the on activation field place:

    Unitname fire "pipebombmuzzle"
    to make the unit set off the satchel place another waypoint from where you want the unit to set the satchel off and put this in the activation field:

    Unitname action ["TOUCHOFF", Unitname]
    If you want the player to do this and make him start with the active satchels you can try to first make the ai unit place the satchels and then switch the player over from another unit.

    2) I am also pretty sure there is no way you can delete actions that are present by default (vehicle actions etc)

    what you can do is make a trigger with as a condition the in vehicle command with a ! to check if the player is not in the vehicle

    something like this :
     !(player in heli)
    And the in the on activation line something like:
    player moveInCargo heli
    This should have the effect that every time you try to jump out of the heli you get automaticaly put back in.

  3. #3
    Gunnery Sergeant armatech's Avatar
    Join Date
    Jan 11 2007
    United Kingdom
    2. just lock the vehicle

  4. #4
    Thanks for the replies. I guess I'll just be using the createVehicle for my phase line explosives then, spawning a Laser guided bomb or HE round produces the similar effect as satchel.

  5. #5
    Im pretty sure you can just spawn a game logic near your ied and then use that to place and touchoff the ied when a condition is reached.

    Untested though, may not be able to use inventory of gl.
    My scripts:

    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.

  6. #6
    To lock the vehicle

    vehiclename lock true;

    To unlock the vehicle

    vehiclename lock false;

Posting Permissions

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