Home   Help Search Login Register  

Author Topic: Artillery script, without user input?  (Read 1380 times)

0 Members and 1 Guest are viewing this topic.

Wolf

  • Guest
Artillery script, without user input?
« on: 10 Sep 2002, 05:54:20 »
Alright, I have no scripting skill what so ever.
So I don't know how to edit scripts beyond basic changing of numbers.
I have looked at the availeble scripts in the editors depot, and they all seem require the player to designate them.

What I need is a script that can be excuted to go off on a game logic, or some thing in the game besides markers,
I need it to create some shells about 10 meters off the ground and randomly fall in an area of about 60 by 60 meters at about a rate of 5 shells every 2 seconds in a loop, until I use another trigger to stop it.
Now, how do I go about making this, and using it?
Thank you.

Cedaie

  • Guest
Re:Artillery script, without user input?
« Reply #1 on: 10 Sep 2002, 06:14:55 »
Pfft, all that trouble when really all you need is triggers that the player will step on, and mines on the ground will go boom, so in each trigger activation field just put:

Mine1 setdammage 1

set the trig to be activated by the players side, present

Useful for the whole 'Wrong place, at the wrong time' scheme ;)

EDIT:*turns on his brain* Ahh now I get ya, something that doesn't require the player to set it off, hrrm, that would have something to do with random XYZ command, but I've neva used that so, this will be a lesson for me too.
« Last Edit: 10 Sep 2002, 06:20:40 by Cedaie »

Wolf

  • Guest
Re:Artillery script, without user input?
« Reply #2 on: 10 Sep 2002, 06:21:13 »
Yes, but that's long and time consuming for a long, full scale artilery barrage.
I need it for cutscenes, and any time an artilley barrage might be hitting somewhere, without any user input.

Offline Dinger

  • Contributing Member
  • **
  • where's the ultra-theoretical mega-scripting forum
Re:Artillery script, without user input?
« Reply #3 on: 10 Sep 2002, 06:42:42 »
In theory, these scripts will work for you.
In practice, they might be too complicated (I disagree, but some don't care how artillery really works).
oops. It turns out OFPEC has downtuned their file submission size.  Hopefully soon I'll be able to post the artillery suite here.  I can say for sure that in a couple days, it will be available at www.thechainofcommand.net .

In any case, the easy answer is: make a trigger (set activation/deactivation as you see fit), that each time it fires shells the area
shell = "Shell120"; radius = 60; "shell camcreate [((getpos this) select 0) + (((_x mod 1)*radius)*sin _x), ((getpos this) select 1) + (((_x mod 1)*radius)*cos _x), 300]" foreach [random 360, random 360, random 360, random 360]

Shell120 may be a little beefy, so you can go smaller.
Dinger/Cfit

Wolf

  • Guest
Re:Artillery script, without user input?
« Reply #4 on: 10 Sep 2002, 06:46:15 »
So all I need to do is put this in the on activation line of a trigger?

Quote
shell = "Shell120"; radius = 60; "shell camcreate [((getpos this) select 0) + (((_x mod 1)*radius)*sin _x), ((getpos this) select 1) + (((_x mod 1)*radius)*cos _x), 300]" foreach [random 360, random 360, random 360, random 360]

Wolf

  • Guest
Re:Artillery script, without user input?
« Reply #5 on: 10 Sep 2002, 18:10:03 »
Thanks, that will work fine I guess.