Page 1 of 2
AA Canon
Posted: Fri Nov 28, 2003 6:44 pm
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.
Posted: Sat Nov 29, 2003 2:20 pm
by Bjarne BZR
Take look at his tutorial that I added a few days ago in the tutorial section: /t.php?id=78
Posted: Mon Dec 01, 2003 2:14 am
by omniscient
yo thats good, thanks, the thing about the sounds i dont get though. could you maybe elabortate on that for me?
Post
Posted: Mon Dec 01, 2003 3:10 am
by tltrude
Post what you have for your script so far.
Posted: Mon Dec 01, 2003 3:23 am
by omniscient
i dont have a script yet, i didnt really get how to start.
Posted: Mon Dec 01, 2003 3:58 am
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?
script
Posted: Mon Dec 01, 2003 6:36 am
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.
Posted: Tue Dec 02, 2003 12:31 am
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.
dm moh obj train
Posted: Tue Dec 02, 2003 6:10 am
by tltrude
No need to put your maps name because "dm moh obj train" covers all game types.
Posted: Tue Dec 02, 2003 9:58 pm
by omniscient
sweet. thanks for all your help.
Posted: Wed Dec 03, 2003 3:57 am
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?
Posted: Wed Dec 03, 2003 4:45 am
by tltrude
local.target = ($target_1.origin)
Posted: Wed Dec 03, 2003 11:37 pm
by omniscient
ok cool. thanks.
Posted: Sat Dec 06, 2003 5:07 pm
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.
Posted: Sat Dec 06, 2003 5:54 pm
by omniscient
lol, also the cannon fires as fast as you can press the use key. not very realistic, any solutions?