OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Trigger_Happy on 03 Aug 2005, 08:48:09

Title: need help with scud script
Post by: Trigger_Happy on 03 Aug 2005, 08:48:09
Hi, i need a script that will let me launch a scud on an area on the map... the scud doesnt have to hit but there needs to be a big explosion... maybe satchels across a 200m area or lgbs over a 200m area.  id like it to run by just putting it in the scuds init field without having to name the scud because its for cti. it should only have 1 shot. none of the scripts i found in the editors depot can do this.
thanks for any help.
Title: Re:need scud script
Post by: Speeder on 03 Aug 2005, 10:27:32
can't you just combine the mapClick command, with a random counter for the area, and a CamCreate command. I had something like that lying about, but my computer crashed, so I can't help you anyfurther.
Title: Re:need scud script
Post by: Trigger_Happy on 03 Aug 2005, 10:36:37
unfortunatly i cant script worth sh!t  :'( thats why i need help maybe someone else can use that idea to help thanks anyway ;D
Title: Re:need scud script
Post by: 456820 on 03 Aug 2005, 10:37:22
im pretty sure thers a scud script in the editors depot plus lgb's over a 200m area isnt that realistic im reading some book 'Bravo two xero' and it says several scuds were launched into a small town and there wasnt much dammage to town structure but there were lots of casualties
any ill look for a link
ermmmmmmmmm aaaahhhhh aha here it is (http://www.ofpec.com/editors/browse.php?browseon=&browsewhat=-1&catselected=-1_-1&catagory=-1&subcategory=-1_-1&numreturn=25&displayformat=0&ofpv=1&searchwhat=1&searchlevel=0&searchwhat=1&searchopts=&searchstring=scud)

hope that helps
Title: Re:need scud script
Post by: Trigger_Happy on 03 Aug 2005, 21:01:42
i know there are scud scripts... i need someone to modify one to make it so i can call it with clickin on the map and some big explosion happens
i found one that works in the editors depot.. but it doesnt work in multiplayer
Title: Re:need scud script
Post by: Triggerhappy on 04 Aug 2005, 03:38:35
onmapsingleclick {[_pos] exec "scudlaunch.sqs"}

i belive thats the correct syntax

obviously you would change the script name and add in the other parameters of the scud script
_pos is defined by clicking so thats all you need

I think if i continue to post in this thread people will get confused as to who is asking and who is answering....lol
Title: Re:need scud script
Post by: Trigger_Happy on 04 Aug 2005, 03:53:37
my msn is Trigger_12234@hotmail.com triggerhappy if u have msn can u walk me through it? cuz i have no idea how to do this. or someone else. thx for the help anyway ill mess with what you gave me for awhile but i doubt ill get it to work :/
Title: Re:need scud script
Post by: 456820 on 04 Aug 2005, 08:35:06
Quote
I think if i continue to post in this thread people will get confused as to who is asking and who is answering....lol

i thought you were answering your own question then lol
Title: Re:need scud script
Post by: Trash Can Man on 04 Aug 2005, 19:22:39
LOL I was thinking the same thing!
Title: Re:need scud script
Post by: Trigger_Happy on 04 Aug 2005, 21:04:43
 ??? guess noone is gonna help :(
Title: Re:need scud script
Post by: Triggerhappy on 05 Aug 2005, 03:00:34
hahaha, thats hilarious 456
Title: Re:need scud script
Post by: Trash Can Man on 05 Aug 2005, 03:58:46
did you take a look at the scud script on the script editors page? I believe you will find it here.

http://www.ofpec.com/editors/browse.php?browsewhat=2&category=2_2&start=25

Hope this helps


Trash Can Man

Title: Re:need scud script
Post by: Trigger_Happy on 05 Aug 2005, 05:01:47
that script is almost what i need but there are some things wrong with it... the person using it has the option to launch scud the entire game even when the scud has been launched, this is for cti so the option needs to be on the scud itself. the scud reloads, and it fires on a trigger, i need it to fire on a point on the map i click after pressing the action on the scud. and the explosions are in the shape of a asterik.. not very good for killing bases if it were a square that would be better
thx anyway  ;D
Title: Re:need scud script
Post by: Dane on 05 Aug 2005, 05:13:09
??? guess noone is gonna help :(

Well, i would like to but don't have much experience with onMapSingleClick.

But if it's any help here's (http://www.ofpec.com/editors/browse.php?browseon=&browsewhat=-1&catselected=-1_-1&catagory=-1&subcategory=-1_-1&numreturn=25&displayformat=0&ofpv=1&searchwhat=1&searchlevel=0&searchwhat=1&searchopts=&searchstring=onmapsingleclick&x=16&y=14) tube missile script that uses onMapSingleClick, maybe you can modify that to use scud instead.
Title: Re:need scud script
Post by: Trigger_Happy on 05 Aug 2005, 08:29:18
it would be easier for someone to just make a new script... heres what i need again


A script called in the init field of the scud using the action menu that will let the player mark where he wants the explosion to be on the map. then the scud launches and it hits and makes a 200m explosion with satchels. then the action disappears from the menu.

thanks for the help so far
Title: Re:need scud script
Post by: Dane on 05 Aug 2005, 09:24:19
In that case this belongs in scripting/Ideas ;) i think.

Or if your in to addons try  the CoC tomahawk addon, it work's both with and without UA and my favorite the CoC_TomahawkBlock2WDUE makes a kickass explosion, and is a small download.
Title: Re:need scud script
Post by: Trigger_Happy on 05 Aug 2005, 22:05:13
it has to be just a script with no addons
Title: Re:need scud script
Post by: Trigger_Happy on 07 Aug 2005, 09:43:14
ive been trying to think of a way to make it work... will it work if you press the action o nthe scud and it activates a script which uses mapclick command and creates timebombs all over the place? im trying to help as much as i can but i cant script  :( im trying to learn just to make this one script but im having a hard time
Title: Re:need help with scud script
Post by: Trigger_Happy on 08 Aug 2005, 12:49:29
i found this script which looks easy to edit

Code: [Select]
_unit = aP
_scud = scud

_x = (getMarkerPos "target") select 0
_y = (getMarkerPos "target") select 1
_z = (getMarkerPos "target") select 2

~2
_scud action ["SCUD Launch"]
~15
_scud action ["SCUD Start"]
~5

_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x+20, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+20, _z]
_shell = "TimeBomb" CamCreate [_x+20, _y+20, _z]
_shell = "TimeBomb" CamCreate [_x+30, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+30, _z]
_shell = "TimeBomb" CamCreate [_x+30, _y+30, _z]
_shell = "TimeBomb" CamCreate [_x+40, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+40, _z]
_shell = "TimeBomb" CamCreate [_x+40, _y+40, _z]
_shell = "TimeBomb" CamCreate [_x+50, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+50, _z]
_shell = "TimeBomb" CamCreate [_x+50, _y+50, _z]
_shell = "TimeBomb" CamCreate [_x+60, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+60, _z]
_shell = "TimeBomb" CamCreate [_x+60, _y+60, _z]
_shell = "TimeBomb" CamCreate [_x-60, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-60, _z]
_shell = "TimeBomb" CamCreate [_x-60, _y-60, _z]
_shell = "TimeBomb" CamCreate [_x-50, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-50, _z]
_shell = "TimeBomb" CamCreate [_x-50, _y-50, _z]
_shell = "TimeBomb" CamCreate [_x-40, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-40, _z]
_shell = "TimeBomb" CamCreate [_x-40, _y-40, _z]
_shell = "TimeBomb" CamCreate [_x-30, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-30, _z]
_shell = "TimeBomb" CamCreate [_x-30, _y-30, _z]
_shell = "TimeBomb" CamCreate [_x-20, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-20, _z]
_shell = "TimeBomb" CamCreate [_x-20, _y-20, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]

exit

Code: [Select]
aP addaction ["Launch!", "scud.sqs"]

all that needs changing is instead of using a trigger to launch the scud on it needs to set where it launches on using the mapclick command and the action to launch it needs to be on the scud instead of the player
Title: Re:need help with scud script
Post by: Triggerhappy on 08 Aug 2005, 17:29:31
Code: [Select]
_unit = _this select 0
_pos = _this select 1
_scud = scud
launchcount = launchcount + 1
?launchcount > maxlaunch:exit

_x = _pos select 0
_y = _pos select 1
_z = _pos select 2

~2
_scud action ["SCUD Launch"]
~15
_scud action ["SCUD Start"]
~5

_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x+20, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+20, _z]
_shell = "TimeBomb" CamCreate [_x+20, _y+20, _z]
_shell = "TimeBomb" CamCreate [_x+30, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+30, _z]
_shell = "TimeBomb" CamCreate [_x+30, _y+30, _z]
_shell = "TimeBomb" CamCreate [_x+40, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+40, _z]
_shell = "TimeBomb" CamCreate [_x+40, _y+40, _z]
_shell = "TimeBomb" CamCreate [_x+50, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+50, _z]
_shell = "TimeBomb" CamCreate [_x+50, _y+50, _z]
_shell = "TimeBomb" CamCreate [_x+60, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+60, _z]
_shell = "TimeBomb" CamCreate [_x+60, _y+60, _z]
_shell = "TimeBomb" CamCreate [_x-60, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-60, _z]
_shell = "TimeBomb" CamCreate [_x-60, _y-60, _z]
_shell = "TimeBomb" CamCreate [_x-50, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-50, _z]
_shell = "TimeBomb" CamCreate [_x-50, _y-50, _z]
_shell = "TimeBomb" CamCreate [_x-40, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-40, _z]
_shell = "TimeBomb" CamCreate [_x-40, _y-40, _z]
_shell = "TimeBomb" CamCreate [_x-30, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-30, _z]
_shell = "TimeBomb" CamCreate [_x-30, _y-30, _z]
_shell = "TimeBomb" CamCreate [_x-20, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-20, _z]
_shell = "TimeBomb" CamCreate [_x-20, _y-20, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]
exit

now add an action to the player:

player addaction ["Launch Scud","scud.sqs"]

Scud.sqs:
Code: [Select]
_unit = this select 0
onmapsingleclick {[_unit,_pos] exec "scudlaunch.sqs"}
exit

and then set launchcount to 0 and maxlaunch to whatever you want in your init.sqs
Title: Re:need help with scud script
Post by: Trigger_Happy on 08 Aug 2005, 19:44:06
is there a way to edit that script to put the action on the scud instead of the player? i tried putting in the scuds name instead of the players and it works but when i press the action nothing happens
Title: Re:need help with scud script
Post by: Triggerhappy on 08 Aug 2005, 21:25:22
Code: [Select]
_scud = _this select 0
_pos = _this select 1
launchcount = launchcount + 1
?launchcount > maxlaunch:exit

_x = _pos select 0
_y = _pos select 1
_z = _pos select 2

~2
_scud action ["SCUD Launch"]
~15
_scud action ["SCUD Start"]
~5

_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x+20, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+20, _z]
_shell = "TimeBomb" CamCreate [_x+20, _y+20, _z]
_shell = "TimeBomb" CamCreate [_x+30, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+30, _z]
_shell = "TimeBomb" CamCreate [_x+30, _y+30, _z]
_shell = "TimeBomb" CamCreate [_x+40, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+40, _z]
_shell = "TimeBomb" CamCreate [_x+40, _y+40, _z]
_shell = "TimeBomb" CamCreate [_x+50, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+50, _z]
_shell = "TimeBomb" CamCreate [_x+50, _y+50, _z]
_shell = "TimeBomb" CamCreate [_x+60, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y+60, _z]
_shell = "TimeBomb" CamCreate [_x+60, _y+60, _z]
_shell = "TimeBomb" CamCreate [_x-60, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-60, _z]
_shell = "TimeBomb" CamCreate [_x-60, _y-60, _z]
_shell = "TimeBomb" CamCreate [_x-50, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-50, _z]
_shell = "TimeBomb" CamCreate [_x-50, _y-50, _z]
_shell = "TimeBomb" CamCreate [_x-40, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-40, _z]
_shell = "TimeBomb" CamCreate [_x-40, _y-40, _z]
_shell = "TimeBomb" CamCreate [_x-30, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-30, _z]
_shell = "TimeBomb" CamCreate [_x-30, _y-30, _z]
_shell = "TimeBomb" CamCreate [_x-20, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y-20, _z]
_shell = "TimeBomb" CamCreate [_x-20, _y-20, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]
_shell = "TimeBomb" CamCreate [_x, _y, _z]
exit