Page 2 of 3

Posted: Wed Oct 29, 2003 9:41 pm
by Franaticus Satanii
Gen_Dis.....you didn't lose me, and thanks for your time. I have just a few questions...

Each explosion is a script_object in the map with a targetname, right?

Is each explosion different or the same type of explosion? What is or how is the effect applied?

Location of the explosion is not based upon coordinates, but rather where the script_object is placed, correct?

Thanks.

Nope

Posted: Wed Oct 29, 2003 9:50 pm
by tltrude
Here is what the tutorial says:

Now all you have to do is this, right click in any 2D view and go to "fx" "explosions" "tank", now place this "tank" effect (entity) anywhere you want. Where you place it is where the explosion will happen. Now hit "N" and add this Key/value:

Key: targetname
Value: random_explode //add 1 if you want more.

You don't have to use that tank one. Look under fx and animate for explosion entities. The explosion starts when the script calls it (see the bottom of my first post).

Posted: Wed Oct 29, 2003 10:36 pm
by General_DisArray
tltrude is correct. you can use any fx/explosions you want. just make sure you have matching targetname in the script and of the script object in your map. you can have the tank explosion in one spot and then have a plane explosion in another part.

and you are correct in assuming that the explosion occurs where you place EACH script_object for that effect. just like tltrude says, just right click in 2D view goto fx/explosions...or whatever kind of effect you want to have. then give it the correct targetname.

now adding the sound that the artillery makes(wizzing through the sky sound) is a little more difficult. you would have to add another script model that emits sound. and it would have to be timed a few seconds before your explosion. i also think that you should only have to add a little to the script just to make it work right.

probably, within the thread of random_explosion1,2, 3, ...etc.

i will look into this and see what i can dig up.

Posted: Wed Oct 29, 2003 10:54 pm
by Franaticus Satanii
Thanks guys. I appreciate all your efforts. I don't want to seem too "thick", but I am not that advanced yet in scripting. I definately don't want to live up to DisArray's quote - LOL.

Cheers.

Posted: Wed Oct 29, 2003 11:51 pm
by General_DisArray
ha ha ha.....no, not at all.

i actually forgot i had that on there. i need to come up with something else.

i am not advanced in scripting either. not even close...but have learned a lot from the first day i posted on here. keep asking, that is the way probably most of us have learned!

Posted: Thu Oct 30, 2003 2:28 pm
by Franaticus Satanii
Thanks for the patience. I have to start somewhere.

Mapping is fun and I am now becoming fairly practiced at it (if I'm allowed to toot my own horn)...it is the scripting and the scripting integration with the map that gives me heartburn. Scripting out the map with events and sounds is really what flushes out a good map making it a great one IMHO.

So, thanks for the help. You guys at .MAP are helping me to become half as good as you! :D

Posted: Thu Oct 30, 2003 7:08 pm
by General_DisArray
okay, this is what i found so far. to have the sound of the arillery wizzing in, you need to add this in your script:

Code: Select all

$random_explode1_origin playsound arty_leadinmp
right after this in the script i showed you:

Code: Select all

wait (randomfloat 13 + 23)
now, i haven't tested this yet....but i am pretty sure you will have to add a script_model and give it a target name of random_explodeX_origin(X - being the variable of what number of explosion you are working with).

place it near one of your artillery explosions. then give it the following keys/values:

Code: Select all

keys: targetname
value: random_explode1_origin
<don't forget to press enter after entering this info in>
keys: model
value: fx/dummy.tik
<press enter>
it should work. i used "random_expled1_origin" as an example name. you can use whatever you want for this as long as they match in the script and in each "script_model".

Posted: Thu Oct 30, 2003 7:42 pm
by Franaticus Satanii
General....thanks for the ongoing efforts.

I haven't been able to get it to work yet. :x I followed Nemesis's tutorial but it was a bust. I will try again and pay even closer attention to what I am doing in an attempt to get the ball rolling.

I will also try it in a smaller map like the tutorial rather than my main map when I get home from work.

Thanks.

Posted: Thu Oct 30, 2003 8:12 pm
by General_DisArray
i can't get the sound to work. i think it will work with an objective type map but not with a deathmatch. i am pretty dang sure it has something to do with the ubersound.scr. that is another bag of problems right there...lol

yeah, i would definitley suggest testing everything in a small test map instead of an ongoing project. so much easier to troubleshoot!!

Posted: Thu Oct 30, 2003 9:07 pm
by Franaticus Satanii
I'll play with all the input I've received so far and try to come up with an option that is satisfactory.

I get all kinds of ubersound.scr errors all the time when I use bots. I have a mod'd dog script that I got from bdbodger which works really well, I am really happy he shared it, but I get "fix it" errors for the dog sounds like barking, growling. etc.

I don't know how to fix it so I just leave it alone since it doesn't seem to harm anything in the map....just fills the console with error messages telling me to "fix the ubersound.scr".

I do what I can, and ask questions about the rest. I learn a little each time.

Thanks.

leadin sound

Posted: Fri Oct 31, 2003 12:55 am
by tltrude
You are right about the leadin sounds only working in objective maps, but we can fix that. Add these lines to the top of your script (between "main:" and "level waittill prespawn") and change the name for the sound in your explosion threads to "leadinmp". The game will randomly pick from the 8 leadin sounds.

Code: Select all


local.master = spawn ScriptMaster

local.master aliascache leadinmp1 sound/weapons/explo/Exp_LeadIn_06.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp2 sound/weapons/explo/Exp_LeadIn_07.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp3 sound/weapons/explo/Exp_LeadIn_08.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp4 sound/weapons/explo/Exp_LeadIn_09.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp5 sound/weapons/explo/Exp_LeadIn_10.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp6 sound/weapons/explo/Exp_LeadIn_11.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp7 sound/weapons/explo/Exp_LeadIn_12.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"
local.master aliascache leadinmp8 sound/weapons/explo/Exp_LeadIn_13.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train"


Let me try to get the ducks in a row....

Posted: Fri Oct 31, 2003 4:27 pm
by Franaticus Satanii
Let us see if this works out correctly..cause it doesn't work in my map at all:

In the map -

- add an [fx/explosions/whatever I want] and place it where I want my explosion.
- Give this entity a [targetname=random_explode]
- In my map's script I add the line:

Code: Select all

thread random_explode1
after level waitill prespawn and before end.
- At the bottom of the script I add the following lines:

Code: Select all

random_explode1:
wait (randomfloat 13 + 23)
$random_explode anim start
radiusdamage $random_explode 256 384
goto random_explode1
end
Here is the mistake I think I found in the tutorial...shouldn't the targetname be random_explode1?

This part I dont understand:

now, i haven't tested this yet....but i am pretty sure you will have to add a script_model and give it a target name of random_explodeX_origin(X - being the variable of what number of explosion you are working with).

place it near one of your artillery explosions. then give it the following keys/values:
Code:
keys: targetname
value: random_explode1_origin
<don't forget to press enter after entering this info in>
keys: model
value: fx/dummy.tik
<press enter>
Now, when I piece together tltrude's comments and General_DisArray's comments with the tutorials...is this what my script is supposed to look like? Can someone please review my latest collage of bad scripting?

Code: Select all

// mymapname
// ARCHITECTURE: me
// SCRIPTING: me and everybody else

main: 
// set scoreboard messages
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none"

// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread

exec global/exploder.scr

local.master = spawn ScriptMaster 

local.master aliascache leadinmp1 sound/weapons/explo/Exp_LeadIn_06.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train" 
local.master aliascache leadinmp2 sound/weapons/explo/Exp_LeadIn_07.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train" 
local.master aliascache leadinmp3 sound/weapons/explo/Exp_LeadIn_08.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train" 
local.master aliascache leadinmp4 sound/weapons/explo/Exp_LeadIn_09.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train" 
local.master aliascache leadinmp5 sound/weapons/explo/Exp_LeadIn_10.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train" 
local.master aliascache leadinmp6 sound/weapons/explo/Exp_LeadIn_11.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train" 
local.master aliascache leadinmp7 sound/weapons/explo/Exp_LeadIn_12.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train" 
local.master aliascache leadinmp8 sound/weapons/explo/Exp_LeadIn_13.wav soundparms 0.8 0.2 0.7 0.5 160 3000 auto loaded maps "m obj dm train" 

level waitTill prespawn

//*** Precache Dm Stuff
exec global/DMprecache.scr

level.script = maps/dm/mymapname.scr
exec global/ambient.scr mymapname

level waittill spawn

thread random_explode1

end

random_explode1:

wait (randomfloat 13 + 23)
$random_explode1_origin playsound leadinmp 
$random_explode anim start
radiusdamage $random_explode 256 384
goto random_explode1

end

Posted: Fri Oct 31, 2003 5:28 pm
by General_DisArray
your script looks good to me. only 1 thing though. is thename of this map and file "mymapname"? your problem might be here in your script:
level.script = maps/dm/mymapname.scr
make sure the name of your script file matches the ".scr" file shown here. your script is correct if your ".scr" file and map are called "mymapname.scr" and "mymapname.bsp". but, if your map and script file are named "test.scr" and "test.bsp", you need to make sure it is in your script right like this:

Code: Select all

level.script = maps/dm/test.scr

also, what part did you not understand in my earlier thread? i will try and be more clear next time. i try and write what i think, but it always comes out in a different way. lol.

Posted: Fri Oct 31, 2003 6:45 pm
by Franaticus Satanii
I just used "mymapname" to make the script descriptions generic. In the real script...all match as you described. I've made that mistake before and it was one of the things I checked first while trouble shooting.

Actually I think I understand where you are coming from now.

What I understood to be one entity for the explosion is actually two. :idea:

Entity#1 : random_explode1 = explosion
Entity #2 : random_explode1_origin = sounds for explosion

So I have this exploded "pit" in my map and I place the exploder in there and then place the audio next to it.

Is this the idea that I couldn't see through my own ignorance? :wink:

After reading through this thread a few times...it almost looks like a very shuffled up tutorial. Could it be?

Posted: Fri Oct 31, 2003 7:36 pm
by General_DisArray
yes they are 2 total seperate entities. i could send you the little test map that i made for the sound. the sound doesn't work, but if you put in the scripting portion that tltrude gave it should work. and it will also show you a little more of what i am talking about.

it is just the same tutorial that nemesis has, but i added some other effects that shoot out when it explodes along with the sound part.

also, you are correct about having your "pit", the exploder(s), and the sound entities in your test map. now it is probably just scripting, your favorite....lol.