Page 1 of 1

no weapons sound

Posted: Mon Mar 20, 2006 12:06 am
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?

Posted: Mon Mar 20, 2006 12:44 am
by PKM
go ask TO, you love him so much.

Posted: Mon Mar 20, 2006 12:59 am
by hogleg
Keep your rants in off topic, i need help on this, not to be notified that PKM has nothing to say again.

Loadout

Posted: Mon Mar 20, 2006 1:39 pm
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.

Re: no weapons sound

Posted: Mon Mar 20, 2006 2:57 pm
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).

Posted: Mon Mar 20, 2006 4:51 pm
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??

example

Posted: Mon Mar 20, 2006 7:00 pm
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.

Posted: Tue Mar 21, 2006 5:03 am
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