Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: "actor.IdleAnimName" How does it work?  (Read 4627 times)

0 Members and 1 Guest are viewing this topic.

ugo

  • Вредная ворона
  • Regular poster
  • ***
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 156
  • Делаю кве
    • View Profile
    • Хранители традиций УниВанга
"actor.IdleAnimName" How does it work?
« on: April 02, 2012, 05:54:18 AM »

actor.IdleAnimName

I can not understand how it works. Can I get an example?
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: "actor.IdleAnimName" How does it work?
« Reply #1 on: April 02, 2012, 09:11:44 AM »

2D actors:

In actor definition you set a couple of spritesets (idle, talk, walk, turnright etc...)

  ANIMATION
  {
    NAME       = "idle"
   
    LEFT       = "actors\molly\ll\stand.sprite"
    RIGHT      = "actors\molly\rr\stand.sprite"
    UP         = "actors\molly\uu\stand.sprite"
    DOWN       = "actors\molly\dd\stand.sprite"

    UP_LEFT    = "actors\molly\ul\stand.sprite"
    UP_RIGHT   = "actors\molly\ur\stand.sprite"
    DOWN_LEFT  = "actors\molly\dl\stand.sprite"
    DOWN_RIGHT = "actors\molly\dr\stand.sprite"
  } 

By default the "idle" is used for idle animation. The variable in question allows you to override it by a different animation. This can be usefull for example if you want to randomly play different idle animations. So if you have eg. animation set called idle2, you can use:

actor.IdleAnimName = "idle2";

For 3D actors, the animations (and their names) should be defined in the .x file itself. In actor definition you will reference the animation set like this:


  ANIMATION
  {
    NAME="idle"
    LOOPING=TRUE
  }

The usage then is the same.

Hope this helped.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

ugo

  • Вредная ворона
  • Regular poster
  • ***
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 156
  • Делаю кве
    • View Profile
    • Хранители традиций УниВанга
Re: "actor.IdleAnimName" How does it work?
« Reply #2 on: April 02, 2012, 10:40:03 AM »

My file "*. actor", looks like this. This is not correct? So, I need to change it?

Code: [Select]
ACTOR
{
  NAME = "actor"
  CAPTION="My brand new actor"
  X = 100
  Y = 100
  SCALABLE = TRUE
  INTERACTIVE = FALSE
  COLORABLE=TRUE
  ROTATABLE = FALSE
  SOUND_PANNING=TRUE
  SCRIPT="actors\bivalov\bivalov.script"
 
  FONT = "fonts\Teslic1.font"

  WALK
  {
    SPRITESET
    {
      LEFT       = "actors\bivalov\ll\walk.sprite"
      RIGHT      = "actors\bivalov\rr\walk.sprite"
      UP         = "actors\bivalov\uu\walk.sprite"
      DOWN       = "actors\bivalov\dd\walk.sprite"

      UP_LEFT    = "actors\bivalov\ul\walk.sprite"
      UP_RIGHT   = "actors\bivalov\ur\walk.sprite"
      DOWN_LEFT  = "actors\bivalov\dl\walk.sprite"
      DOWN_RIGHT = "actors\bivalov\dr\walk.sprite"
    }
  }
 
  STAND
  {
    SPRITESET
    {
      LEFT       = "actors\bivalov\ll\stand.sprite"
      RIGHT      = "actors\bivalov\rr\stand.sprite"
      UP         = "actors\bivalov\uu\stand.sprite"
      DOWN       = "actors\bivalov\dd\stand.sprite"

      UP_LEFT    = "actors\bivalov\ul\stand.sprite"
      UP_RIGHT   = "actors\bivalov\ur\stand.sprite"
      DOWN_LEFT  = "actors\bivalov\dl\stand.sprite"
      DOWN_RIGHT = "actors\bivalov\dr\stand.sprite"
    }
  }
...

And then, something like that.
Logged

ugo

  • Вредная ворона
  • Regular poster
  • ***
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 156
  • Делаю кве
    • View Profile
    • Хранители традиций УниВанга
Re: "actor.IdleAnimName" How does it work?
« Reply #3 on: April 02, 2012, 01:11:26 PM »

I modified the code for an actor and it worked. Everything is working. Thank you very much.
Logged
 

Page created in 0.033 seconds with 20 queries.