AA Canon

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

AA Canon

Post by omniscient »

alright im making an aa gun, and all i want it to do is fire every so often. can i get a tutorial on how to do this? im too stupid to figure it ot when i have the .map right infront of me. thanks.
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Take look at his tutorial that I added a few days ago in the tutorial section: /t.php?id=78
Admin .MAP Forums
Image
Head above heels.
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

yo thats good, thanks, the thing about the sounds i dont get though. could you maybe elabortate on that for me?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post

Post by tltrude »

Post what you have for your script so far.
Tom Trude,

Image
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

i dont have a script yet, i didnt really get how to start.
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

ok im thinking for myself finally. is there a sound file of an explosion? because then u could just put that somewhere in the script right?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post by tltrude »

You can probably use the waterfall script, if both are in the same map. As it says in the tutorial, the firing sound that is built into the flak88 model does not normally work in multiplayer maps. But, this code in your script will get it working.

local.master = spawn ScriptMaster
local.master aliascache flak_snd_fire1 sound/weapons/fire/TankCannonFire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm moh obj train"
local.master aliascache flak_snd_fire2 sound/weapons/fire/Flak88Fire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm moh obj train"
local.master aliascache flak_snd_fire3 sound/weapons/fire/Flak88Fire3.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm moh obj train"
local.master aliascache flak_snd_fire4 sound/weapons/fire/Flak88Fire4.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm moh obj train"

It goes right under where it says [setcvar "g_scoreboardpic"]. That other thread called by the "setthread" in the trigger should be put under the last "end" in the script.

I think it may be time for a small scripting lesson. A script "thread" starts with a name and a colon, and stops with the word "end". Here is an example of a thread.

my_thread:

$myentity playsound flak_snd_fire // randomly picks one of the 4 sounds

end

You don't need the above thread in your script--it is just an example. But, if a trigger called it from the map, the entity targetnamed "myentity" would play the sound.

Hope that helps.
Tom Trude,

Image
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

ok cool. i see in the last line it says something about obj train. do i replace that wiht my map name? thanks for the mini lesson it cleared up some confusion for me.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

dm moh obj train

Post by tltrude »

No need to put your maps name because "dm moh obj train" covers all game types.
Tom Trude,

Image
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

sweet. thanks for all your help.
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

hmm, i was thinking, where you put the location, instead of doing it in x,y,z could u give something a target name, and use that as your taget, like instead of local.target = ( 100.0 0.0 0.0 ) put local.target ($target_1) Would that work?
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post by tltrude »

local.target = ($target_1.origin)
Tom Trude,

Image
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

ok cool. thanks.
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

um, i noticed the damage radius is very small, is there a way to make the radius bigger, like the ones in omaha kina, wher the middla kills and near it does damage. i know i got a lot of ?s thanks for puttin up w/ me.
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

lol, also the cannon fires as fast as you can press the use key. not very realistic, any solutions?
Post Reply