Home   Help Search Login Register  

Author Topic: Launch Scud Script  (Read 987 times)

0 Members and 1 Guest are viewing this topic.

Offline terran4999

  • Members
  • *
Launch Scud Script
« on: 14 Jun 2008, 02:01:52 »
Hello

I have looked all over the Editor Depot and did some google searching and found no scud launch script. I want the scud to launch and then hit a target area marked by a gamelogic. Would anyone be kind enough to post their script ???

Offline Gcfungus

  • Members
  • *
Re: Launch Scud Script
« Reply #1 on: 14 Jun 2008, 09:37:24 »
For this you would need 2 parts of a script. First part launches the scud, and the second would create an explosion.

The first part would look something like this:

Code: [Select]
scudname Action ["SCUD LAUNCH"]
~13
scudname Action ["SCUD START"]

I'm not sure about the length in between, but I think 13 should be enough.
The first command points the rocket upwards, and the second launches it.

Unfortunately, the rocket is just for looks, it doesn't actually do anything, so you'll need a second part to create the explosion.

It would look something like this:
Code: [Select]
_ammo = "LaserGuidedBomb"
_pos = getmarkerpos "bombmarker
_x = _pos select 0
_y = _pos select 1
_z = 50
_bomb = _ammo camcreate [_x,_y,_z]

You can change the following: the _ammo type, the marker name, and the _z position (height)
Note: the previous will only create one LGB. If you want a bigger explosion, then the script will need to be changed to create multiple ones.

Hope it works,
-=GC=-Fungus1999
« Last Edit: 14 Jun 2008, 17:28:44 by Gcfungus »
The object of war is not to die for your country, but to make the other bastard die for his.
~George Patton

Offline terran4999

  • Members
  • *
Re: Launch Scud Script
« Reply #2 on: 14 Jun 2008, 23:02:26 »
Hey

I just want to know if this command is correct:
 
Code: [Select]
"_X flyinheight 50" foreach units this


If this is a valid command why is it not working? I tried putting this in the WP Activation and well as in the Init of units