Home   Help Search Login Register  

Author Topic: Need help with 2 basic script syntax  (Read 1111 times)

0 Members and 1 Guest are viewing this topic.

Offline Python1

  • Members
  • *
Need help with 2 basic script syntax
« on: 11 May 2009, 18:09:18 »
Hi everyone, I'm very excited to be back making missions again with ArmA. However, I've found that I have forgotten some very simple things and need your help with them.

One- I would like to spawn a green smoke grenade at the drop zone but can't quite remember how. Pretty sure I need to createVehicle, but for that I need the location of, and I'm not sure how to find the location of the invisible H, can I use the H as location? Can someone post the syntax for me?

Two-Once the radar towers are destroyed I would like to remove the ammo of the AAA defenses, but can't remember that syntax either (note: I need the trigger to read both towers are dead). So I'm thinking "not alive Radar1 && not alive Rader2" activation "whatever syntax removes ammo from gun1 gun2 etc".

I've been searching the forums, and will continue to do so because I know my answers are hidden in there, but if anyone has the time to post a quick reply I'd really appreciate it.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Need help with 2 basic script syntax
« Reply #1 on: 11 May 2009, 19:09:51 »
Hi there, and welcome (back) to ArmA editing!

Answer one: createvehicle is indeed the command you need, together with the 'vehicle' you want to create + getpos to decide the position of the created object. You can use the "ammo classname" from this list: CfgWeapons for the smokeshell to create it. Then you use getpos get the location of the invisible h So, e.g.:

Code: [Select]
bomb1= "SmokeShellGreen" createvehicle getpos InvisH1
(the bomb1= is necessary, yes)

Answer two: What are the AA defenses? Shilkas, Strela-carrying soldiers, machinegun nests? Whatever the case, I think removeAllWeapons should do the trick, but if not you might have to start experimenting with removeMagazines and the above mentioned CfgWeapons list (e.g., remove all the "2000Rnd_23mm_AZP85" magazines from the Shilka etc.) So:

Code: [Select]
On Activation: {removeallweapons _x} foreach [gun1, gun2, gun3...]
Might do it :)

Good luck!

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Python1

  • Members
  • *
Re: Need help with 2 basic script syntax
« Reply #2 on: 11 May 2009, 19:23:50 »
Smoke works great, I had been trying camcreate after finding this post HERE http://www.ofpec.com/forum/index.php?topic=17892.0. But I knew it was creatVehicle I needed. As for the removeMagazines, I'll have to check on that, but your post has given me enough reference to solve the rest I'm sure. Thanks for your help.