OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Dove on 21 Apr 2004, 13:00:09

Title: launch scud to co-ordinates
Post by: Dove on 21 Apr 2004, 13:00:09
Sorry if there is a thread already about this.

Does anyone know, how to make a scud launch on a point which u set, say after 5 minutes a scud is launched, but the the scud i am using is a addon nuke scud, were u can specify co-ordinates for and it will land there, does anyone know how to make the AI launch it on a point after time??

it would be very helful if u could help me..

thanks
Dove

???
Title: Re:launch scud to co-ordinates
Post by: csde-PiLLe on 21 Apr 2004, 15:51:29
Well :)

Hmm. If your addon does not offer this, you will probably have to write your own script.

I recommend reading an article on how to obtain a position of an user's mapclick, since I have not used this feature yet :)

The script would be:

_detpos = positionyouobtainedfrommapclick (your code goes here!)
~300
(5 * 60 seconds)

launch scud (your scud launch code goes here - another thing you could read a tutorial on ;) )

~30
(30 seconds timer to have your scud go up and come down again.)

_mynuke = "nukewarheadname" camcreate _detpos

Where "nukewarheadname" is to be replaced by any nuclear explosive.

You can either use the nuke your addon creates (look it up in the readme or dePBO the addon to get to the config.cpp and look it up) or any other nuclear warhead created by addons (e.g. CoC_Torpedoes, which contains a  readme with all relevant information).

Cheers
PiLLe
Title: Re:launch scud to co-ordinates
Post by: Wadmann on 21 Apr 2004, 18:12:33
As usual, here I am plugging snYpir's excellent SP/MP Support Pack (http://www.ofpec.com/editors/spt_pack.php). It offers a scud that can be set to launch at any given time in a mission and is easily modified to use a nuke script upon impact. Of course it does offer a whole lot more than just a scud/artillery script. I bet after checking it out you will also find more uses for it than just the scud! ;)

                                                                 Wadmann
Title: Re:launch scud to co-ordinates
Post by: Dove on 22 Apr 2004, 18:42:39
ok all that gave me was the script to click were to launch it ,.but i already had that,



 i want to know how to make the AI launch it after time?????
Title: Re:launch scud to co-ordinates
Post by: Wadmann on 22 Apr 2004, 20:07:55
Quote
Posted by: Dove  Posted on: Today at 09:42:39am  
ok all that gave me was the script to click were to launch it ,.but i already had that,

i want to know how to make the AI launch it after time?????  

Dove,

      Is your question directed at my comment or csde-PiLLe's? If the latter, then
Code: [Select]
~300
would mean that the script would wait five minutes until it continues.

     If your question is for me, then in the Support Pack the init_general.sqs you would define the start time in the pre-defined fire missions section as shown below:

Quote
_predefined_arty2 =      ["Scud HE",  -1, 0,getmarkerpos "scudtarget",east]

The "0" means that the fire mission will start at the beginning of the mission.  Straight from the script:

Quote
start time (use decimal time, ie 7.5 is 07:30). Use 0 for immediately. - NUMBER

      Hope that this gets you going in the right direction.

                                                                  Wadmann