no weapons sound

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

no weapons sound

Post by hogleg »

ha ha found this scrounging around M6L1 script:

Code: Select all

/* holy great hacks batman!! I don't think this is needed anymore as alarm switches are no longer triggerable once bomb has been placed and ai is better now.
hackresetaionguysoutside:          ///// GERaatest haX0r evar!!  //leaches off all of bensons alarmzonetriggers to make two guys "react" to disguise better.. hah ahah.
ok im making a SP map for AA, the weapons i added work but

main:

level waittill prespawn

$player item weapons/colt45.tik
$player ammo pistol 50
$player item weapons/m1_garand.tik
$player ammo rifle 100
$player item weapons/bar.tik <<<<<<<<<<<NO SOUND ONLY AT A LONG DISTANCE
$player ammo mg 500
$player item weapons/springfield.tik <<<<<<<<<<<NO SOUND ONLY AT A LONG DISTANCE
$player ammo rifle 200
$player item weapons/m2frag_grenade_sp.tik
$player ammo grenades 6 <<<<<<<<<<<< ONLY GETS 1 GRENADE


Am i using the wrong name (bar), (springfield) cause the m1_garand sound fine? oh and my precache file:

cache weapons/colt45.tik
cache weapons/m1_garand.tik
cache weapons/bar.tik
cache weapons/springfield.tik
cache weapons/m2frag_grenade_sp.tik

only the sniper and bar don't have sound when shooting real far away?

i got this from mohradaint docs

Code: Select all

To give the player ammo, this script command should be used:
$player ammo type amount
Type is a small string identifier for the type of ammo to give, and amount is the amount of that ammo type to give to the player. The different ammo types are:
pistol
rifle
smg (for sub-machineguns)
mg (for machineguns)
grenades
shotgun
heavy (for heavy explosive weapons like the bazooka)
anyone?
"all the governments in the world are corrupt and in the hands of the Illuminati"
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Post by PKM »

go ask TO, you love him so much.
i'm not f****** angry, i'm from philadelphia .
Image
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Post by hogleg »

Keep your rants in off topic, i need help on this, not to be notified that PKM has nothing to say again.
"all the governments in the world are corrupt and in the hands of the Illuminati"
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Loadout

Post by tltrude »

For singleplayer, you need the loadout script. Here is an example of the line from m1L1.

exec global/loadout.scr "maps/m1l1.scr"

You can make you own loadout script, but it is easier to just use one from the game.
Tom Trude,

Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Re: no weapons sound

Post by Rookie One.pl »

hogleg wrote: $player ammo grenades 6 <<<<<<<<<<<< ONLY GETS 1 GRENADE
models/weapons/m2frag_grenade_sp.tik wrote:// ammo type, is "agrenade" rather than "grenade", which will allow the
// player to carry both american and german grenades seperatly in SP games.
And that's the TIKI you should have used. ;)

Tom, that's not it. The script you're referring to is unnecessary and IMHO a pointless detour.

As to the sounds, what's the name of your map? Try naming it "test_yourmapname" (the sound caching is dependant on the map's name, the test_ prefix makes the game precache all the sounds and animations included in the game).
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Post by hogleg »

if its the name why would the Garand sound work perfect and not the sniper?

its a single player map named m1l1_ai

and when i added th exec global/loadout.scr "maps/m1l1.scr",

i have no weapons. Would it have anything to do with giving the AI hearing of 500??
"all the governments in the world are corrupt and in the hands of the Illuminati"
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

example

Post by tltrude »

OK, so m1l1 is not a good example. This code is from the loadout script.

Code: Select all

		if (level.script == "maps/m3l3.scr")
		{
			$player item weapons/colt45.tik
			$player item weapons/Springfield.tik
			$player item weapons/ThompsonSMG.tik
			$player item weapons/BAR.tik

			$player ammo pistol 80
			$player ammo rifle 200
			$player ammo smg 200
			$player ammo mg 400
			$player ammo agrenade 4

			$player useweaponclass rifle
		}
Notice that you have to define "level.script" before you exec the loadout line. And, for granades it uses "ammo agrenade". Of course you don't have to use the loadout if you just put the stuff in your main script.
Tom Trude,

Image
User avatar
hogleg
General
Posts: 1577
Joined: Tue Sep 09, 2003 5:23 pm
Location: Down South Hillbilly Country

Post by hogleg »

the Rookie nailed it! for some reason i thought SP didn't need test but it does!

this seems like a deja vu :?

Thx

***edit***
LMAO.....i am getting old.
/forum/viewtopic.php?p=47840&highlight=#47840
"all the governments in the world are corrupt and in the hands of the Illuminati"
Post Reply