Forum

> > Stranded II > Mods > Change firing sound
Forums overviewStranded II overview Mods overviewLog in to reply

English Change firing sound

6 replies
To the start Previous 1 Next To the start

old Change firing sound

-RZ-
User Off Offline

Quote
There is any way to change the bow behavior firing sound?
Sorry, I am not good with scripts (I understand and I can edit, but "create" scripts is another stuff).
Thank you.

old Re: Change firing sound

Hurri04
Super User Off Offline

Quote
no, I dont think this is possible with just scripts normally.

what might work though is to replace the bow sound in the sfx folder with an empty sound file and "override" the sound for every item which uses the bow behaviour by hand by using the s2 cmd play command.

old Re: Change firing sound

Hurri04
Super User Off Offline

Quote
you don't? then what do you want to do? because the op reads to me like you wanted to...

old Re: Change firing sound

-RZ-
User Off Offline

Quote
Oh, I'm sorry, what I tried to say:

Bow
name=Bow
id=...
behavior=bow
//Bow default shooting sound

My crazy gun
name=Wunnderwaffe MM-118
id=...
behavior=bow
//my weapon sound

do you understand? I want to change just for my weapon.

old Re: Change firing sound

Hurri04
Super User Off Offline

Quote
well, since there is no definition line for a firing sound I'm pretty sure that this is tied to the behaviour.
thus to change the sound you would have to either pick a different behaviour (see here for reference, scroll down to "item beaviours") or do what I described above.

obviously you'd have to make the script play the old sound for the weapons which are supposed to keep the old sound and play your new sound for your own weapon.

old Re: Change firing sound

mutantroosta
User Off Offline

Quote
this is from the game itself (not my code)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
### Shotgun
id=110
name=Shotgun
group=weapon
icon=gfx\shotgun.bmp
model=gfx\shotgun.b3d
scale=0.335
behaviour=gun
range=120
rate=800
mat=metal
weight=2500
info=this gun causes a lot of damage but it has only a very small range
damage=10
healthchange=0
script=start
	on:attack1 {
		if (gety("unit",1)<-15){
			skipevent;
			speech "negative";
		}else{
			if (playergotitem(29)>0) { play "shotgun.wav"; }
		}
	}
	on:impact {
		$tmp=impact_class();
		$tmp2=impact_id();
		//+100 Bonus Damage on Flesh
		if (compare_material($tmp,$tmp2,"flesh")==1){
			damage $tmp,$tmp2,100;
		//+100 Bonus Damage on Fruit
		} elseif (compare_material($tmp,$tmp2,"fruit")==1){
			damage $tmp,$tmp2,100;
		//+200 Bonus Damage on Glass
		} elseif (compare_material($tmp,$tmp2,"glass")==1){
			damage $tmp,$tmp2,200;
		}
		freevar $tmp;
		freevar $tmp2;
	}
	on:inhand {
		play "crack1.wav";
	}
	on:noammo {
		speech "negative";
		msg "No ammo!",3;
	}
script=end
and this is a tweaked version
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
### my gun
id=...
name=my gun
group=weapon
icon=gfx\mygun.bmp
model=gfx\mygun.b3d
scale=0.335
behaviour=gun
range=120
rate=800
mat=metal
weight=2500
info=this gun causes a lot of damage but it has only a very small range
damage=10
healthchange=0
script=start
	on:attack1 {
		if (gety("unit",1)<-15){
			skipevent;
			speech "negative";
		}else{
			if (playergotitem(29)>0) { play "mygun.wav"; }
		}
	}
	on:impact {
		$tmp=impact_class();
		$tmp2=impact_id();
		//+100 Bonus Damage on Flesh
		if (compare_material($tmp,$tmp2,"flesh")==1){
			damage $tmp,$tmp2,100;
		//+100 Bonus Damage on Fruit
		} elseif (compare_material($tmp,$tmp2,"fruit")==1){
			damage $tmp,$tmp2,100;
		//+200 Bonus Damage on Glass
		} elseif (compare_material($tmp,$tmp2,"glass")==1){
			damage $tmp,$tmp2,200;
		}
		freevar $tmp;
		freevar $tmp2;
	}
	on:inhand {
		play "crack1.wav";
	}
	on:noammo {
		speech "negative";
		msg "No ammo!",3;
	}
script=end

pretty basic really =]
To the start Previous 1 Next To the start
Log in to reply Mods overviewStranded II overviewForums overview