Jump to content

Photo
- - - - -

A couple of scripting issues


  • Please log in to reply
5 replies to this topic

#1 Stalker1979

Stalker1979

    Rookie

  • Members
  • 4 posts

Posted 10 January 2011 - 12:37 PM

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.

Thanks.

#2 joske

joske

    Sergeant

  • Members
  • 106 posts

Posted 12 January 2011 - 04:06 PM

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.
http://community.bis...ki/selectPlayer

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 commandhttp://community.bis...wiki/in_vehicle 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 armatech

armatech

    Gunnery Sergeant

  • Members
  • 543 posts

Posted 13 January 2011 - 07:00 AM

2. just lock the vehicle

#4 Stalker1979

Stalker1979

    Rookie

  • Members
  • 4 posts

Posted 13 January 2011 - 04:51 PM

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 Demonized

Demonized

    Warrant Officer

  • Members
  • 2653 posts

Posted 15 January 2011 - 10:48 AM

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 Koni

Koni

    Gunnery Sergeant

  • Members
  • 458 posts

Posted 23 January 2011 - 10:51 PM

2.
To lock the vehicle
-----------------------

vehiclename lock true;


To unlock the vehicle
--------------------------

vehiclename lock false;


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users