The game you are trying to view has ceased development and consequently been archived. If you are a member of this game, can demonstrate that it is being actively developed and will be able to keep this profile up to date with the latest news, images, videos and downloads, please contact us with all details and we will consider its re-activation.

An adaptation of Dead Space for psp completely new story line. using a heavily modified quake engine if you have nothing good to say don't say it at all

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
RSS Articles

Adding Multiple Sounds to a monster

Client Side Coding Tutorial 2 comments

Okay start off my opening the hknight.qc

scroll down to this

// set missile speed<br />	vec = normalize (v_forward);<br />	vec_z = 0 - vec_z + (random() - 0.5)*0.1;<br />	<br />	launch_spike (org, vec);<br />	newmis.classname = "knightspike";<br />	setmodel (newmis, "progs/k_spike.mdl");<br />	setsize (newmis, VEC_ORIGIN, VEC_ORIGIN);		<br />	newmis.velocity = vec*300;<br />	sound (self, CHAN_WEAPON, "hknight/attack1.wav", 1, ATTN_NORM);

now

infront of this:

sound (self, CHAN_WEAPON, "hknight/attack1.wav", 1, ATTN_NORM);

Add:

local float r;<br />	\r = rint(random() * 4);

so it looks like this:

local float r;
     r = rint(random() * 4);
      
       sound (self, CHAN_WEAPON, "hknight/attack1.wav", 1, ATTN_NORM);

now for the simple if statements:

add before of sound (self etc

if (r == 1)

no now it looks like:

local float r;
     r = rint(random() * 4);

     if (r == 1)      
       sound (self, CHAN_WEAPON, "hknight/attack1.wav", 1, ATTN_NORM);

cool so now you have 1 but you have set the random for 4 not 1 so do this:

local float r;
     r = rint(random() * 4);

     if (r == 1)      
       sound (self, CHAN_WEAPON, "hknight/attack1.wav", 1, ATTN_NORM);

     if (r == 2)      
       sound (self, CHAN_WEAPON, "hknight/attack2.wav", 1, ATTN_NORM);

     if (r == 3)      
       sound (self, CHAN_WEAPON, "hknight/attack3.wav", 1, ATTN_NORM);

     if (r == 4)      
       sound (self, CHAN_WEAPON, "hknight/attack4.wav", 1, ATTN_NORM);

now open world.qc and under

	precache_sound ("misc/water1.wav");			// swimming
	precache_sound ("misc/water2.wav");			// swimming

add

     
precache_sound ("hknight/attack1.wav");
precache_sound ("hknight/attack2.wav");
precache_sound ("hknight/attack3.wav");
precache_sound ("hknight/attack4.wav");

now place your sounds into the hknight folder compile and run

and there you have it the hellknight will play 4 sounds randomly instead of 1

Post comment Comments  (0 - 10 of 92)
Balfias
Balfias

Please revive this it really looks promising.

Reply Good karma Bad karma+1 vote
Guest
Guest

This comment is currently awaiting admin approval, join now to view.

Guest
Guest

This comment is currently awaiting admin approval, join now to view.

arasadusan
arasadusan

DEAD?

Reply Good karma Bad karma+1 vote
PSP-H4CKERxX
PSP-H4CKERxX

wow lol this is soo dead

Reply Good karma Bad karma+1 vote
PSP-H4CKERxX
PSP-H4CKERxX

wtf happened to this it looks cool

Reply Good karma Bad karma+1 vote
DeductionKing
DeductionKing

What the Fu** come on at least get a demo you can't die now you had ENraged Psp with a good Release and was flying through that and just saying don't start a game you can't get finished? and a good idea at that.

Reply Good karma Bad karma+2 votes
wy477wh173
wy477wh173

why soo dead? This is something I would play, especially if it was for PC.

Reply Good karma Bad karma+1 vote
Sharky.
Sharky.

Why did it die?

Reply Good karma Bad karma+2 votes
ordoabchao
ordoabchao

Dead, Fake, and GAY

Reply Good karma Bad karma+4 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account:

X