basically i want it so that... you hit E (or what ever your use key is set to) on the radio.. and then there will be a game message that says "Allies have called an artiller strike!!!" then like 3 seconds later you hear them coming in and bam!!! all 20 spots that i set are being bombed.. but i dont want them bombed at exact same time... like 2 secs apart.. but some can be at same time...
Artillery!!
Moderator: Moderators
-
Hashmark13
- Major
- Posts: 299
- Joined: Mon Nov 25, 2002 12:20 am
- Location: USA
Artillery!!
ok i want like 20 spots that artillery shells will land when you call them in on a radio...
basically i want it so that... you hit E (or what ever your use key is set to) on the radio.. and then there will be a game message that says "Allies have called an artiller strike!!!" then like 3 seconds later you hear them coming in and bam!!! all 20 spots that i set are being bombed.. but i dont want them bombed at exact same time... like 2 secs apart.. but some can be at same time...
im stupid and i havent a clue on how to do this. ive never been able to understand scripting 
basically i want it so that... you hit E (or what ever your use key is set to) on the radio.. and then there will be a game message that says "Allies have called an artiller strike!!!" then like 3 seconds later you hear them coming in and bam!!! all 20 spots that i set are being bombed.. but i dont want them bombed at exact same time... like 2 secs apart.. but some can be at same time...
" If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside."
Tutorial map
This tutorial map has a mortar that works pretty much like that. It fires at three random spots. The zip includes the script, map file, and a playable pk3.
http://pages.sbcglobal.net/tltrude/Temp ... ngdoor.zip

Even if you only copy the trigger and the three explosion spots, you will be way ahead.
http://pages.sbcglobal.net/tltrude/Temp ... ngdoor.zip

Even if you only copy the trigger and the three explosion spots, you will be way ahead.
-
Hashmark13
- Major
- Posts: 299
- Joined: Mon Nov 25, 2002 12:20 am
- Location: USA
oh wow... so i just put a trigger use around a radio... and set it up like that.. (without the mortar sounds and without mortar)... btw that map has something for everything
anyways.. i get the idea thanks alot
but ive got it to work with different targetnames and stuff.. but umm yeah im not very smart when i comes to scripting.. here is my script below that seems to be working... but i just want to add a few things...
i was wanting it so that you cant call in another strike on the radio for like 60 secs and i was just wondering how i could make it so that its just one big bombing raid... like you go up to radio and use it and there is about 3 mins of constant artillery shells... this is lots to ask for but i could really use the help
and a limit of 3 strikes
but ive got it to work with different targetnames and stuff.. but umm yeah im not very smart when i comes to scripting.. here is my script below that seems to be working... but i just want to add a few things...
Code: Select all
artillery_fire:
$artilleryradio_trigger waittill trigger
$artilleryradio playsound Exp_LeadIn_09
wait 25.0
local.random = randomint(3)
if (local.random == 0)
{
$random_exp1 playsound Exp_Dirt_03
wait .5
$artillery_exp1 anim start
radiusdamage $artillery_exp1 550 635
waitexec global/earthquake.scr .3 1.5 0 0
waitexec global/earthquake.scr .35 .75 0 0
goto artillery_fire
}
else
if (local.random == 1)
{
$artillery_exp2 playsound Exp_LeadIn_11
wait .5
$artillery_exp2 anim start
radiusdamage $random_exp2 550 635
waitexec global/earthquake.scr .3 1.5 0 0
waitexec global/earthquake.scr .35 .75 0 0
goto artillery_fire
}
else
if (local.random == 2)
{
$artillery_exp3 playsound Exp_LeadIn_12
wait .5
$artillery_exp3 anim start
radiusdamage $random_exp3 550 635
waitexec global/earthquake.scr .3 1.5 0 0
waitexec global/earthquake.scr .35 .75 0 0
goto artillery_fire
}
endand a limit of 3 strikes
" If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside."
-
Hashmark13
- Major
- Posts: 299
- Joined: Mon Nov 25, 2002 12:20 am
- Location: USA
i got the script above working (need to make delay time for explosion less) but umm it just plays grenade explosion sound
and the lead in sounds dont work??? should i edit ubersound thingy??? and ive never done that so what should i do??
" If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside."
ok,
lets get a copy of the ubersound script so you can check the sounds.
1. Make a copy of pak0.pk3 and change the name (rigt mouse click) to pak0.zip.
2. Open Winzip and find options. Then turn off "auto intall screensvers", or somthing like that.
3. Unzip pak0.zip and find the folder called ubersound.
4. Open it and find "ubersound.scr" and change the name to "ubersound.txt".
Now you can open it with Wordpad or Notepad--probably to much text for notepad. Ok do a search in that text file for your sound names that don't work.
Here is an example fo what you will find:
---------------------------------------------------------------------
aliascache arty_leadin4 sound/weapons/explo/Exp_LeadIn_09.wav soundparms 0.5 0.2 0.7 0.5 160 1600 auto loaded maps "m3l1a m3l1b "
---------------------------------------------------------------------
The name of this sound alias is arty_leadin4 and not Exp_LeadIn_09 which is the name of the wav file it plays. And. it only works for maps m3l1a and m3l1b. So what you need to find is an "arty_leadin" alias name that works with "m moh dm obj train" maps--depends on what type game your map is.
If you can't find one that works with your type game, there is a work around to make sounds work, but we can discuss that later--there is a tutorial for it at ".map". That should be enough for now.
Ps: Just noticed that "arty_leadinmp1" alias only works for objective maps, so I guess my lead-in sounds don't work in my "dm" tutorial map.
1. Make a copy of pak0.pk3 and change the name (rigt mouse click) to pak0.zip.
2. Open Winzip and find options. Then turn off "auto intall screensvers", or somthing like that.
3. Unzip pak0.zip and find the folder called ubersound.
4. Open it and find "ubersound.scr" and change the name to "ubersound.txt".
Now you can open it with Wordpad or Notepad--probably to much text for notepad. Ok do a search in that text file for your sound names that don't work.
Here is an example fo what you will find:
---------------------------------------------------------------------
aliascache arty_leadin4 sound/weapons/explo/Exp_LeadIn_09.wav soundparms 0.5 0.2 0.7 0.5 160 1600 auto loaded maps "m3l1a m3l1b "
---------------------------------------------------------------------
The name of this sound alias is arty_leadin4 and not Exp_LeadIn_09 which is the name of the wav file it plays. And. it only works for maps m3l1a and m3l1b. So what you need to find is an "arty_leadin" alias name that works with "m moh dm obj train" maps--depends on what type game your map is.
If you can't find one that works with your type game, there is a work around to make sounds work, but we can discuss that later--there is a tutorial for it at ".map". That should be enough for now.
Ps: Just noticed that "arty_leadinmp1" alias only works for objective maps, so I guess my lead-in sounds don't work in my "dm" tutorial map.
-
Hashmark13
- Major
- Posts: 299
- Joined: Mon Nov 25, 2002 12:20 am
- Location: USA
ok thanks
but now how would i do what i wrote above
ive looked through some script files from spearhead battle of the bulge but thats just jibberish to me 
" If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside."
If you add too many many explosion models to your map the console will complain that the game is out of temp models
so what I whould do is use script origins instead . Give them a $targetname of artillery and place as many as you need .
then use this thread
artillery_fire:
$artilleryradio_trigger waittill trigger
$artilleryradio_trigger nottriggerable
local.timer=level.time + 60
while (level.time < local.timer)
{
$artilleryradio playsound arty_leadin
// if you have a alias with a number the the end the game will pick one at random
local.random = randomint($artillery.size)+1
// default explosion for the global/model.scr is models/emitters/explosion_mine
// but you can use others if you add them to end of the line like this"
exec global/model.scr $artillery[local.random].origin "models/fx/fx_tank_explosion.tik "
radiusdamage $artillery[local.random].origin 550 635
waitexec global/earthquake.scr .3 1.5 0 0
waitexec global/earthquake.scr .35 .75 0 0
wait 5 // how long between explosions
}
wait 60 // wait before allowing another bomb run
$artilleryradio_trigger triggerable
goto arillery fire
end
There is a thread on how to make a tiki to load the aliases of the sounds you need do a search for it .
so what I whould do is use script origins instead . Give them a $targetname of artillery and place as many as you need .
then use this thread
artillery_fire:
$artilleryradio_trigger waittill trigger
$artilleryradio_trigger nottriggerable
local.timer=level.time + 60
while (level.time < local.timer)
{
$artilleryradio playsound arty_leadin
// if you have a alias with a number the the end the game will pick one at random
local.random = randomint($artillery.size)+1
// default explosion for the global/model.scr is models/emitters/explosion_mine
// but you can use others if you add them to end of the line like this"
exec global/model.scr $artillery[local.random].origin "models/fx/fx_tank_explosion.tik "
radiusdamage $artillery[local.random].origin 550 635
waitexec global/earthquake.scr .3 1.5 0 0
waitexec global/earthquake.scr .35 .75 0 0
wait 5 // how long between explosions
}
wait 60 // wait before allowing another bomb run
$artilleryradio_trigger triggerable
goto arillery fire
end
There is a thread on how to make a tiki to load the aliases of the sounds you need do a search for it .
-
Hashmark13
- Major
- Posts: 299
- Joined: Mon Nov 25, 2002 12:20 am
- Location: USA
ok thanks!
and one last thing (or a couple)... about the origins... where the shells hit... how do i add the line into script to make them work.. and will this script bomb all the origins with one artillery strike i hope it does! and how can i make it just repeat that bombing pattern for like 2 mins...?? like for instance... you call radio.. the you hear the lead in sounds and boom... but it keeps doing it over and over again untill 2 mins has passed (btw i will have alot of random spots... mostly near craters and trenches where people will be hoping they survive... hehe)
Thanks for your time on that last bit of script... i try scripting on my own but it turns into some crazy jibberish stuff that the game just ignores lol
Thanks for your time on that last bit of script... i try scripting on my own but it turns into some crazy jibberish stuff that the game just ignores lol
" If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside."
-
Hashmark13
- Major
- Posts: 299
- Joined: Mon Nov 25, 2002 12:20 am
- Location: USA
-
Hashmark13
- Major
- Posts: 299
- Joined: Mon Nov 25, 2002 12:20 am
- Location: USA
one last.. stupid question... do what targetname do i give the origins (the places where the shells hit)..
currently i have 3 origins... targetname: artillery_exp3 (that one is for the third one obviously
) if i remove the number will it pick any origin at random or will it probly hit all of them simultaniously???
" If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside."
-
Hashmark13
- Major
- Posts: 299
- Joined: Mon Nov 25, 2002 12:20 am
- Location: USA
ugh... i found some thing from bdbodger for sounds...
how do i get that to work in my map?? and what directory do i put it in in the final pk3 format??? one last thing... i want the limit to artillery strikes is 3 ugh... how do i change that??? or maybe i didnt wait 60 secs to see if it was already limted
i feel like im asking way too much and doing too little ...thanks guys 
Code: Select all
TIKI
setup
{
path models/fx/dummy
skelmodel dummy3.skd
}
init
{
server
{
classname ScriptModel
rendereffects +dontdraw
notsolid
}
client
{
settiki none
aliascache dog_bark1 sound/characters/dog_bark_1.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "t dm obj "
aliascache dog_bark2 sound/characters/dog_bark_2.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "t dm obj "
}
}
animations
{
idle dummy3.skc
}" If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside."
to make the sounds work copy everything into notepad except the alias lines unless you want those sounds . Then open pak0.pk3 and in the ubersound/ubersound.scr ( or the ubersound/uberdialog.scr for dialog ) you will find the alias the game uses .
As for the rest of your post what do you mean 3 bomb drops or 3 raids total? The way the script is now you trigger a 60 sec bombing when it stops you can't call another one for another 60 secs . Change the timer or the wait at the bottom to adjust that .
You see the part in red that means that only maps that start with those prefixes will play this sound (directory is part of the prefix so any map in the dm or obj directory will play this sound ). As you can see the letter "t" this is a spearhead sound but it is the same for mohaa . What you can do is lets say your map is called "artillerymap" and your map is artillerymap.bsp you can add your map to the end of the alias like soaliascache dog_bark1 sound/characters/dog_bark_1.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "t dm obj "
but if your map is in the dm directory it is not nessesary to add it to the list . Any way go through the ubersound.scr and find the sounds you need and useing notepad or another text editor copy them into the file and make sure they have the map name or dm or obj in the maps list . When you are done save it as artillerymap.tik and add the line to your artillerymap_precache.scr "cache models/artillerymap.tik " all .tik's are in the models directory so put your tik in the models directory of your pak .aliascache dog_bark1 sound/characters/dog_bark_1.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "t dm obj artillerymap"
As for the rest of your post what do you mean 3 bomb drops or 3 raids total? The way the script is now you trigger a 60 sec bombing when it stops you can't call another one for another 60 secs . Change the timer or the wait at the bottom to adjust that .
