Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Doctor Jeep on January 28, 2003, 02:41:55 AM

Title: about the ACTOR object...
Post by: Doctor Jeep on January 28, 2003, 02:41:55 AM

Please remember I am a non-programmer by nature but i have a little experience with ASP and Javascript.

It's so cool that I can call the TALK method of the ACTOR object and the engine just knows how to make him say that stuff.

What about a NON player Character (NPC right?)
My NPC is a sprite, do i just create a TALK sprite for whatever direction he might be facing (lets say he only looks right or left) and then just call the TALK method for the entity called MyNPC?

Do I have to create an actor for every NPC that talks in the game?

I don't want to take up a bunch of your time writing a tutorial on this, but give me enough to get going on. I'm really just wondering how the engine is -aware- of an entity that can TALK or if its all manually scripted.

thanks!

PS - is there any way to fade in a MUSIC file and then have it loop indefinately for that scene? I know how to do everything but the FADE IN.

 ;D

Title: Re:about the ACTOR object...
Post by: Mnemonic on January 28, 2003, 08:26:46 AM
If a character doesn't walk, you can use an "entity" instead. It's actually a simplified version of an actor - although they can't walk, they still have the Talk and PlayAnim methods. See the WME demo project, the "Old Guy" person is an entity (check the oldguy.entity file).

About the music fading... there is not a command for it in WME (well, maybe there should be...), but you can do it with a bit of scripting. Something like:
Code: [Select]
var OrigMusicVol = Game.GetGlobalMusicVolume();

for(var i=0; i<OrigMusicVolume; i=i+10)
{
  Game.SetGlobalMusicVolume(i);
  Sleep(100);
}

Well, it's just a dumb example, it would need to be tweaked a bit...
Title: Re:about the ACTOR object...
Post by: Doctor Jeep on January 28, 2003, 07:43:53 PM
Cool. cool... thanks again.

Can i have an unlimted number of actors in my scene/project?

Maybe, for my version of the Old Guy I can make an actor that only has a walk animation in one direction? Does it have to be a fully-assmbled actor like MOLLY? I'm guessing not.



Title: Re:about the ACTOR object...
Post by: Mnemonic on January 30, 2003, 03:29:54 PM
Can i have an unlimted number of actors in my scene/project?

There's no hardcoded limit, but you should limit the number of actors appearing simultaneously in one scene, because one actor typically takes up a lot of memory.


Maybe, for my version of the Old Guy I can make an actor that only has a walk animation in one direction? Does it have to be a fully-assmbled actor like MOLLY? I'm guessing not.

You'll need to set all the eight walking animations to one sprite.
Anyway, actors definition will probably change a bit in some future release of WME. I'm not satisfied with the current state.