Artillery Bombardment!
Moderator: Moderators
-
Franaticus Satanii
- Colour Sergeant
- Posts: 84
- Joined: Tue Aug 19, 2003 5:38 pm
- Location: Florida, USA
Artillery Bombardment!
This is the general theory for what I would like to accomplish:
1. Four (4) areas which are artillery targets.
2. They must be bombarded at irregular intervals so as not to appear uniform. This includes the incoming bomb whistle and boom (for realism).
3. Cause player damage (though minimal - maybe 25 to 50% health) as not to interupt game play.
4. Have explosion with fire, smoke, debris and lots of noise.
I have searched for this with no definitive answer on how to begin (or complete) this task. I have started to diassemble some of the stock maps looking for exploders and etc., but the scripting and objects are way over my expertise level. If someone can break it down it would be helpful.
I am NOT an agile scripter from any point of view. Rudamentary at best. Any response will be appreciated. Any tutorials would be fantastic.
Thanks.
1. Four (4) areas which are artillery targets.
2. They must be bombarded at irregular intervals so as not to appear uniform. This includes the incoming bomb whistle and boom (for realism).
3. Cause player damage (though minimal - maybe 25 to 50% health) as not to interupt game play.
4. Have explosion with fire, smoke, debris and lots of noise.
I have searched for this with no definitive answer on how to begin (or complete) this task. I have started to diassemble some of the stock maps looking for exploders and etc., but the scripting and objects are way over my expertise level. If someone can break it down it would be helpful.
I am NOT an agile scripter from any point of view. Rudamentary at best. Any response will be appreciated. Any tutorials would be fantastic.
Thanks.
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
It is impossible to make anything foolproof because fools are so ingenious.
if you speak french it may help you.
http://tropheus.tropheus.free.fr/script ... explo.html
tropheus
http://tropheus.tropheus.free.fr/script ... explo.html
tropheus
-
Franaticus Satanii
- Colour Sergeant
- Posts: 84
- Joined: Tue Aug 19, 2003 5:38 pm
- Location: Florida, USA
From the screen shot and from what I could translate that was blatantly obvious....it looks like exactly what I am trying to get at.
Any english translation of that tutorial would be great not only for me....but for anyone else that is attempting artillery....
But for now....any chance converting that to english for us linguistically challenged folk? I guess I better get a french->english dictionary
Any english translation of that tutorial would be great not only for me....but for anyone else that is attempting artillery....
But for now....any chance converting that to english for us linguistically challenged folk? I guess I better get a french->english dictionary
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
It is impossible to make anything foolproof because fools are so ingenious.
Random explosions
Here is a tutorial in english:
http://users.1st.net/kimberly/Tutorial/random.htm
He has the wrong comment for "radiusdamage". The two numbers are, damage to player, and radius from the entity in all directions. Here are the explosion threads (last one in the tutorial) from Omaha Beach (obj_team3.scr):
Lets look at the first one as an example (random_explode1) line by line.
1. The thread will wait between 13 and 23 seconds before running.
2. Then the leadin sound is played from a script_origin with the targetname of "random_explode1_origin"--that origin entity is just above the explosion entity in the map.
3. Wait one second to give the sound time to play.
4. Start the explosion animation and sound for the entiy targetnamed "random_explode1". That entity should be sitting on, or just under, the surface of your crater. You can replace it with any explosion entity you wish, or add more, but not all of them have their own sound.
5. Damage the player by 256 health points (kills him) if he is within 384 units of the script_origin targetname "random_explode1_origin"--same one used for sound. Note: There is an area around the radius that will damage the player less and less the farthar he is from the entity. So, maybe I am wrong, and the first number is the kill zone limit and the second is the lesser damage limit.
6. Return to the top of the thread and wait again. Notice that there is no "end" line. It doesn't really need one because of the "goto", but wouldn't hurt to have one there.
Hope that helps!
http://users.1st.net/kimberly/Tutorial/random.htm
He has the wrong comment for "radiusdamage". The two numbers are, damage to player, and radius from the entity in all directions. Here are the explosion threads (last one in the tutorial) from Omaha Beach (obj_team3.scr):
Code: Select all
random_explode1:
wait (randomfloat 13 + 23)
$random_explode1_origin playsound arty_leadinmp
wait 1
$random_explode1 anim start
radiusdamage $random_explode1_origin 256 384
goto random_explode1
random_explode2:
wait (randomfloat 7 + 20)
$random_explode2_origin playsound arty_leadinmp
wait 1
$random_explode2 anim start
radiusdamage $random_explode2_origin 256 384
goto random_explode2
random_explode3:
wait (randomfloat 9 + 18)
$random_explode3_origin playsound arty_leadinmp
wait 1
$random_explode3 anim start
radiusdamage $random_explode3_origin 256 384
goto random_explode3
random_explode4:
wait (randomfloat 12 + 18)
$random_explode4_origin playsound arty_leadinmp
wait 1
$random_explode4 anim start
radiusdamage $random_explode4_origin 256 384
goto random_explode4
random_explode5:
wait (randomfloat 15 + 22)
$random_explode5_origin playsound arty_leadinmp
wait 1
$random_explode5 anim start
radiusdamage $random_explode5_origin 256 384
goto random_explode5
random_explode6:
wait (randomfloat 8 + 15)
$random_explode6_origin playsound arty_leadinmp
wait 1
$random_explode6 anim start
radiusdamage $random_explode6_origin 256 384
goto random_explode6
random_explode7:
wait (randomfloat 10 + 24)
$random_explode7_origin playsound arty_leadinmp
wait 1
$random_explode7 anim start
radiusdamage $random_explode7_origin 256 384
goto random_explode7
end
1. The thread will wait between 13 and 23 seconds before running.
2. Then the leadin sound is played from a script_origin with the targetname of "random_explode1_origin"--that origin entity is just above the explosion entity in the map.
3. Wait one second to give the sound time to play.
4. Start the explosion animation and sound for the entiy targetnamed "random_explode1". That entity should be sitting on, or just under, the surface of your crater. You can replace it with any explosion entity you wish, or add more, but not all of them have their own sound.
5. Damage the player by 256 health points (kills him) if he is within 384 units of the script_origin targetname "random_explode1_origin"--same one used for sound. Note: There is an area around the radius that will damage the player less and less the farthar he is from the entity. So, maybe I am wrong, and the first number is the kill zone limit and the second is the lesser damage limit.
6. Return to the top of the thread and wait again. Notice that there is no "end" line. It doesn't really need one because of the "goto", but wouldn't hurt to have one there.
Hope that helps!
-
Franaticus Satanii
- Colour Sergeant
- Posts: 84
- Joined: Tue Aug 19, 2003 5:38 pm
- Location: Florida, USA
Thanks Tom. I have run the french tutorial through an internet english to french translator and have come up with an idea of what Tropheus is trying to explain. Unfortunetly....I don't see where the damage is in his script. Here is the multi player version of Tropheus's tutorial:
No offense Tropheus, I am not asking for a second opinion on your script, rather just some insight in how th script is written and functions. The effect is awesome and I really want to use it.
Call me thick, but even with these two tutorials...I am still a little lost.
Code: Select all
//mapping : Tropheus
//scripting : Tropheus
main :
// set scoreboard messages
setcvar "g_scoreboardpic" "none"
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
Thread random_explode
level.script = maps/dm/test_explo_multi.scr
level waittill spawn
end
/////////////////////////////////////
random_explode:
local.target=$refer
local.a=local.target.origin
local.b=randomint (100)
if (local.b < 25)
{
local.a[0]=local.a[0] - randomint (200)
local.a[1]=local.a[1] - randomint (200)
}
else if (local.b < 50 && local.b >=25)
{
local.a[0]=local.a[0] + randomint (200)
local.a[1]=local.a[1] + randomint (200)
}
else if (local.b > 50 && local.b <= 75)
{
local.a[0]=local.a[0] - randomint (200)
local.a[1]=local.a[1] + randomint (200)
}
else if (local.b > 75)
{
local.a[0]=local.a[0] + randomint (200)
local.a[1]=local.a[1] - randomint (200)
}
local.exp1=spawn "fx/scriptbazookaexplosion.tik"
local.exp2=spawn "animate/fx_mortar_dirt.tik"
local.exp3=spawn "animate/fx_mortar_higgins.tik"
local.exp1.origin=local.a
local.exp1 anim start
local.exp2.origin=local.a
local.exp2 anim start
local.exp3.origin=local.a
local.exp3 anim start
wait(1 + ((randomint(5))*.2))
local.exp1 remove
local.exp2 remove
local.exp3 remove
goto random_explode
end
Call me thick, but even with these two tutorials...I am still a little lost.
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
It is impossible to make anything foolproof because fools are so ingenious.
Fancy
Ok, his is very fancy and randomly moves the (spawned) explosions all over the map (I think). I don't see damage either, but it can be added like this:
radiusdamage (local.origin.a + ( 0 0 64)) 250 256
Maybe his can be added to a stock map script as well, if the entity "$refer" is replaced with a spawned script_origin and set to a centeral coordinate.
radiusdamage (local.origin.a + ( 0 0 64)) 250 256
Maybe his can be added to a stock map script as well, if the entity "$refer" is replaced with a spawned script_origin and set to a centeral coordinate.
Last edited by tltrude on Wed Oct 29, 2003 8:42 pm, edited 1 time in total.
-
Franaticus Satanii
- Colour Sergeant
- Posts: 84
- Joined: Tue Aug 19, 2003 5:38 pm
- Location: Florida, USA
The way it is explained is you create an entity and define it as a script_object with the targetname "refer" (possibly an abbreviation for "reference" point). The explosion will have a diameter of 400.
Am I to assume (hate that word) that I am to create various "reference" points within the map that the script will rotate through creating explosions at differing intervals? This is how I am currently reading the script.
Better yet, all I really want is the fantastic combination used to create the explosion. Is there a way to use Nemesis's watered down tutorial with explosive combo from Tropheus?
Am I to assume (hate that word) that I am to create various "reference" points within the map that the script will rotate through creating explosions at differing intervals? This is how I am currently reading the script.
Better yet, all I really want is the fantastic combination used to create the explosion. Is there a way to use Nemesis's watered down tutorial with explosive combo from Tropheus?
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
It is impossible to make anything foolproof because fools are so ingenious.
- General_DisArray
- Warrant Officer
- Posts: 142
- Joined: Tue Dec 17, 2002 4:17 am
- Location: magnolia, texas
it doesn't randomly explode arty over your map. you still have to add the explosions, fire, sand plume/water plumes, and sound to the areas of your map you would like the arty to "seem" to be fired at. you have to still give the objects a targetname of "random_explode1" and etc for each explosion.....
but the code:
tells it to explode this artillery at at floating interval,not a floating area of the map. i believe it explodes at say 13 seconds first then 23 seconds then 36 seconds. it randomized that, but not where it is. makes it look more realistic and more random.
set up a test map with one shell with this script:
and one that has this script:
and see how it reacts. should be quite interesting.
but the code:
Code: Select all
random_explode1:
wait (randomfloat 13 + 23) set up a test map with one shell with this script:
Code: Select all
random_explode1:
wait (randomfloat 1 + 2) Code: Select all
random_explode1:
wait (randomfloat 3 + 4) Yes
In Nemisis' tutorial you have to add the explosion entities to the map yourself. So, you can add the same ones that Tropheus is spawning (three of them). Then just add their targetnames to additional script lines. Or, you could spawn them as he did.
Ok, I see now that his explosions move around the target entity, but he has no way to add more. so you would have to copy the thread over and over with new names.
Ok, I see now that his explosions move around the target entity, but he has no way to add more. so you would have to copy the thread over and over with new names.
Last edited by tltrude on Wed Oct 29, 2003 9:00 pm, edited 1 time in total.
-
Franaticus Satanii
- Colour Sergeant
- Posts: 84
- Joined: Tue Aug 19, 2003 5:38 pm
- Location: Florida, USA
This is also part of the tutorial which I don't understand....he says to combine the "variable" and the "vector"...here's a very rough french to english interpretation:
FRENCH: Qu'est ce qu'une variable ? C'est tout simplement un nom qui permet de garder une valeur num?rique sans ?crire de nombre.
ENGLISH: What is a variable ? This is all simply a name that allows keeping a numerical value without writing number.
FRENCH: Qu'est ce qu'une variable "local" ? C'est une variable qui n'est utilisable que dans le thread o? elle est cr??e.
ENGLISH: What is a variable "local" ? This is a variable that is not usable that in the thread where she is created.
FRENCH: Qu'est-ce qu'un vecteur (vector en anglais) ? C'est la d?finition d'un point dans l'espace, c'est ? dire ses coordonn?es. Ici comme on est dans un jeu en 3D le vecteur comporte 3 valeurs. Une valeur pour X, une pour Y et une pour Z (dans cet ordre.)
ENGLISH: What is a vector ? This is the definition of a point in the space, this is to say its coordinated ones. Here as one is in a game in 3D the vector behaves 3 values. A value for X, for Y and for Z (in this order.)
FRENCH: L'int?r?t de combiner variable et vecteur c'est qu'on peut modifier ? loisir les coordonn?es du vecteur.
ENGLISH: The interest to combine variable and vector this is that one can modify to leisure them coordinated of the vector.
General_DisArray...you have me totally confused. I'm not good at scripting and this is getting beyond my current skill level. I have no idea on how to "test" scripts. Can you take the time to explain? I would love to learn.
FRENCH: Qu'est ce qu'une variable ? C'est tout simplement un nom qui permet de garder une valeur num?rique sans ?crire de nombre.
ENGLISH: What is a variable ? This is all simply a name that allows keeping a numerical value without writing number.
FRENCH: Qu'est ce qu'une variable "local" ? C'est une variable qui n'est utilisable que dans le thread o? elle est cr??e.
ENGLISH: What is a variable "local" ? This is a variable that is not usable that in the thread where she is created.
FRENCH: Qu'est-ce qu'un vecteur (vector en anglais) ? C'est la d?finition d'un point dans l'espace, c'est ? dire ses coordonn?es. Ici comme on est dans un jeu en 3D le vecteur comporte 3 valeurs. Une valeur pour X, une pour Y et une pour Z (dans cet ordre.)
ENGLISH: What is a vector ? This is the definition of a point in the space, this is to say its coordinated ones. Here as one is in a game in 3D the vector behaves 3 values. A value for X, for Y and for Z (in this order.)
FRENCH: L'int?r?t de combiner variable et vecteur c'est qu'on peut modifier ? loisir les coordonn?es du vecteur.
ENGLISH: The interest to combine variable and vector this is that one can modify to leisure them coordinated of the vector.
General_DisArray...you have me totally confused. I'm not good at scripting and this is getting beyond my current skill level. I have no idea on how to "test" scripts. Can you take the time to explain? I would love to learn.
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
It is impossible to make anything foolproof because fools are so ingenious.
Hie {RSHA} Heydrich Reinhard.
in fact in this tutorail i used a script_object (targetname /refer) as central point for my explosions. After i use random (200) to make a square (400 X 400) where the explosions run. and only in this square.
a seconde variable is the time beetween to explosion. is this line.
wait(1 + ((randomint(5))*.2))
if i don't use volumedamage is because the explosion i used get this fonction in the script
The difference between nemensis tutorial and mine is that nemensis act only on time but never the explosions change place.
that's what run in mine.
Sorry for my english. I try to explain it better i can.
Tropheus
in fact in this tutorail i used a script_object (targetname /refer) as central point for my explosions. After i use random (200) to make a square (400 X 400) where the explosions run. and only in this square.
a seconde variable is the time beetween to explosion. is this line.
wait(1 + ((randomint(5))*.2))
if i don't use volumedamage is because the explosion i used get this fonction in the script
The difference between nemensis tutorial and mine is that nemensis act only on time but never the explosions change place.
that's what run in mine.
Sorry for my english. I try to explain it better i can.
Tropheus
Sorry i flood, but i haven't read the post before i post mine.
The sentences you translte is just a explaination for french people of
variable local, vector. I inspired from bjarne tutorial. (in english).
see it and the explaination will be better.
Tropheus
http://www.planetmedalofhonor.com/rjuka ... guage.html
The sentences you translte is just a explaination for french people of
variable local, vector. I inspired from bjarne tutorial. (in english).
see it and the explaination will be better.
Tropheus
http://www.planetmedalofhonor.com/rjuka ... guage.html
-
Franaticus Satanii
- Colour Sergeant
- Posts: 84
- Joined: Tue Aug 19, 2003 5:38 pm
- Location: Florida, USA
Tropheus,
Nothing wrong with the script OR the tutorial (it would help if it were english...but not a problem with a translator)
. I am just pulling it apart with a little help from my friends at .MAP to learn how things work.
It is nice to learn a script with an objective at the end to understand the concept a little better.
Thanks for everyone's help. I will endeavor to try both versions and see what the outcome is.
Thanks again.
Nothing wrong with the script OR the tutorial (it would help if it were english...but not a problem with a translator)
It is nice to learn a script with an objective at the end to understand the concept a little better.
Thanks for everyone's help. I will endeavor to try both versions and see what the outcome is.
Thanks again.
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
It is impossible to make anything foolproof because fools are so ingenious.
"local" ? This is a variable that is only usable in the thread where it is used.
"vector" ? This is the definition of a point in space. They are, to say, distances from a 3D coordinate. The vector has 3 values. A value for X, for Y and for Z (in this order.) But they are not from the center of the map, rather from the origin point of an entity and the X line will point in whatever direction the entity points. So if you vector a point, you would move x, y, z units from the origin.
Note: his script used numbers, [0] and [1] to call the X and Y vector moves--Z is not changed (height). Remember, a vector is written as 3 numbers ( -200 200 0) and they are called/set with [0] [1] [2].
"vector" ? This is the definition of a point in space. They are, to say, distances from a 3D coordinate. The vector has 3 values. A value for X, for Y and for Z (in this order.) But they are not from the center of the map, rather from the origin point of an entity and the X line will point in whatever direction the entity points. So if you vector a point, you would move x, y, z units from the origin.
Note: his script used numbers, [0] and [1] to call the X and Y vector moves--Z is not changed (height). Remember, a vector is written as 3 numbers ( -200 200 0) and they are called/set with [0] [1] [2].
Last edited by tltrude on Wed Oct 29, 2003 9:28 pm, edited 1 time in total.
- General_DisArray
- Warrant Officer
- Posts: 142
- Joined: Tue Dec 17, 2002 4:17 am
- Location: magnolia, texas
sorry, i didn't mean to confuse you.
this is where i learned how to do the random explosions.
http://users.1st.net/kimberly/Tutorial/tutdownlads.htm
he has good tutorials....now, in this tutorial, he only has one explosion in the middle of the example map. but not to worry, just copy his example over and over again by just adding 1 number to the targetname(ie. random_explosion1, random_explosion2......etc). in case i lost you again, this is done in radiant.
now in your script, say you have 10 random explosion occuring in your map. this is what it would look like......from a script of a map i made.
i hope i didn't confuse you even more.......
Gen_Dis
this is where i learned how to do the random explosions.
http://users.1st.net/kimberly/Tutorial/tutdownlads.htm
he has good tutorials....now, in this tutorial, he only has one explosion in the middle of the example map. but not to worry, just copy his example over and over again by just adding 1 number to the targetname(ie. random_explosion1, random_explosion2......etc). in case i lost you again, this is done in radiant.
now in your script, say you have 10 random explosion occuring in your map. this is what it would look like......from a script of a map i made.
Code: Select all
//First map
//architecture General_DisArray
//scripting General_DisArray and others
main:
//set scoreboard messages
setcvar "g_obj_alliedtext1" "Watch Your Six,"
setcvar "g_obj_alliedtext2" "Stay Low &,"
setcvar "g_obj_alliedtext3" "Kill Em' All!"
setcvar "g_obj_axistext1" "Watch Your Six,"
setcvar "g_obj_axistext2" "Stay Low &,"
setcvar "g_obj_axistext3" "Kill Em' All!"
setcvar "g_scoreboardpic" "Firstmap.jpg"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
//*** Fog parms
$world farplane 2500
$world farplane_color (.333 .333 .359)
level.script = maps/dm/firstmap.scr
exec global/ambient.scr mohdm1
exec global/weather.scr
exec global/exploder.scr
level waittill spawn
thread random_explode1
thread random_explode2
thread random_explode3
thread random_explode4
thread random_explode5
thread random_explode6
thread random_explode7
thread random_explode8
thread random_explode9
thread random_explode10
end
//-------------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based games here.
level waittill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
//--------------------------------------------------------------------------
random_explode1:
wait (randomfloat 3 + 7)
$random_explode anim start
radiusdamage $random_explode 256 384
goto random_explode1
end
random_explode2:
wait (randomfloat 10 + 5)
$random_explode1 anim start
radiusdamage $random_explode1 256 384
goto random_explode2
end
random_explode3:
wait (randomfloat 3 + 8)
$random_explode2 anim start
radiusdamage $random_explode2 256 384
goto random_explode3
end
random_explode4:
wait (randomfloat 9 + 7)
$random_explode3 anim start
radiusdamage $random_explode3 256 384
goto random_explode4
end
random_explode5:
wait (randomfloat 10 + 9)
$random_explode4 anim start
radiusdamage $random_explode5 256 384
goto random_explode5
end
random_explode6:
wait (randomfloat 11 + 10)
$random_explode5 anim start
radiusdamage $random_explode4 256 384
goto random_explode6
end
random_explode7:
wait (randomfloat 17 + 5)
$random_explode6 anim start
radiusdamage $random_explode6 256 384
goto random_explode7
end
random_explode8:
wait (randomfloat 19 + 5)
$random_explode7 anim start
radiusdamage $random_explode7 256 384
goto random_explode8
end
random_explode9:
wait (randomfloat 4 + 3)
$random_explode8 anim start
radiusdamage $random_explode8 256 384
goto random_explode9
end
random_explode10:
wait (randomfloat 9 + 4)
$random_explode9 anim start
radiusdamage $random_explode9 256 384
goto random_explode10
end
Gen_Dis
