Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: about the ACTOR object...  (Read 3750 times)

0 Members and 1 Guest are viewing this topic.

Doctor Jeep

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 12
  • It's a lamp.
    • View Profile
    • hEADTHiNG productions
about the ACTOR object...
« 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

Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5677
    • View Profile
    • Dead:Code Site
Re:about the ACTOR object...
« Reply #1 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...
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Doctor Jeep

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 12
  • It's a lamp.
    • View Profile
    • hEADTHiNG productions
Re:about the ACTOR object...
« Reply #2 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.



Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5677
    • View Profile
    • Dead:Code Site
Re:about the ACTOR object...
« Reply #3 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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.724 seconds with 23 queries.