AA Canon
Moderator: Moderators
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
AA Canon
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:
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
script
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.
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.
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
dm moh obj train
No need to put your maps name because "dm moh obj train" covers all game types.
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am

