Author |
Message |
wolf3dbreaker
I am Death Incarnate


Joined: 09 Jun 2003
Last Visit: 29 Sep 2009
Topics: 31
Posts: 196
Location: Philippines

|
Posted: Wed Aug 06, 2003 9:07 pm
Subject: [Info] Zombies Making Sounds (Mutants)
[ IP : Logged ]
|

 
|
|
You know Haunted House Demo? the zombies like moan when they chase you. Does anyone know how to do that?And CodeTech, please don't Brag about it. if you know how to do it, please tell me. please?
thanks! |
_________________ Gone from the community for a while. Will be back on July
|
|
 |
Codetech84
Code Master

Joined: 12 Mar 2003
Last Visit: 27 Aug 2018
Topics: 22
Posts: 1284
Location: Rauma - Finland

|
Posted: Thu Aug 07, 2003 2:12 am
Subject: Re: Enemy shouting
[ IP : Logged ]
|

  
|
|
I'll get a piece of the code:
Place this in WL_ACT2.C, before this function is used.
::: CODE :::
void ZombieIdle (objtype *ob);
This also goes to WL_ACT2.C:
::: CODE :::
///////////////////////////////////////////
// ZombieIdle
///////////////////////////////////////////
void ZombieIdle (objtype *ob)
{
int dx,dy,dist;
dx = abs(ob->tilex - player->tilex);
dy = abs(ob->tiley - player->tiley);
dist = dx>dy ? dx : dy;
if (areabyplayer[ob->areanumber])
if (US_RndT() < 0.5 && !DigiPlaying && dist < 4)
{
PlaySoundLocActor (SCHEISTSND,ob);
}
if (US_RndT() < 0.5 && !DigiPlaying && dist < 4)
{
PlaySoundLocActor (MECHSTEPSND,ob);
}
if (US_RndT() < 0.5 && !DigiPlaying && dist < 4)
{
PlaySoundLocActor (SLURPIESND,ob);
}
}
Place this in the actors chase state(s). I suggest you put in only one of the chase frames so it won't be repeated too often:
::: CODE :::
ZombieIdle
You know were this goes don't you...
Oh, and those were taken directly from Haunted House source code.
As you see the propability is very small, this way I could avoid too fast repetition. Please bare in mind that this is very old code, it dates back to the days when I was a newbie...
*sigh*  |
_________________ Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
|
|
 |
thellt
Bring 'em On

Joined: 21 Jan 2008
Last Visit: 12 May 2009
Topics: 11
Posts: 85
Location: bloodgulch

|
Posted: Fri Feb 29, 2008 1:39 pm
Subject: Re: [Info] Zombies Making Sounds (Mutants)
[ IP : Logged ]
|

  
|
|
i think all you need is the sd playsound thingy when he hears you... or is this something else?... maybe it is kind of actor speak sounds... can we make a guard threaten you if you run away? (haha!) or make an "ouch!" sound? maybe we are on to something big...
@codetech
sorry for bumping i just thought as i was reading this that that might be a good idea...  |
_________________ }{even or }{ellt?
look for helt3d
Last edited by thellt on Mon Mar 03, 2008 11:47 am; edited 1 time in total
|
|
 |
Codetech84
Code Master

Joined: 12 Mar 2003
Last Visit: 27 Aug 2018
Topics: 22
Posts: 1284
Location: Rauma - Finland

|
|
 |
Adam Biser
Utility Developer


Joined: 06 Jun 2003
Last Visit: 06 Feb 2019
Topics: 46
Posts: 2318
Location: USA

|
|
 |
Codetech84
Code Master

Joined: 12 Mar 2003
Last Visit: 27 Aug 2018
Topics: 22
Posts: 1284
Location: Rauma - Finland

|
|
 |
|