Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: MARTIN151 on January 03, 2025, 12:06:24 PM

Title: What exactly is ACTOR description
Post by: MARTIN151 on January 03, 2025, 12:06:24 PM
Hello,

my debigging console says that there is a syntax error in ACTOR definition.

But I have absolutely no idea, in which of the files the error is. Of course it is in one of the actor-associated files, but which exactly?

This problem causes more errors and leads to not spawning the actor (but in scene editor the actor shows normally).

Could someone please help me? Thanks.
Title: Re: What exactly is ACTOR description
Post by: Mot on April 28, 2025, 06:33:26 PM
Quote from: MARTIN151
Of course it is in one of the actor-associated files, but which exactly?

I'd say one whose file extension is either .act3d (for 3D actors) or .actor (for 2D actors).

3D actor definition files look like this:

Code: WME Script
  1. ACTOR3DX
  2. {
  3.   NAME = "trinity"
  4.   CAPTION = "Trinity"
  5.   INTERACTIVE = TRUE
  6.   ACTIVE = TRUE
  7.   SCRIPT = "actors\trinity\trinity.script"
  8.   SHADOW_IMAGE = "actors\trinity\shadow.png"
  9.   SHADOW_SIZE = 12.0
  10.   LIGHT_POSITION { -40, 200, -40 }
  11.   SHADOW_TYPE = "stencil"
  12. ;  SHADOW_COLOR { 0, 0, 0, 128 }
  13. ;  SHADOW_MODEL = "actors\trinity\trinity_low.x"
  14.   SCALE = 180
  15.  
  16.   ;--- velocity
  17.   VELOCITY = 70.0
  18.   ANGULAR_VELOCITY = 400.0
  19.  
  20.   ;--- external data
  21.   MODEL = "actors\trinity\trinity.x"
  22.   FONT = "fonts\outline_white.font"
  23.   ;CURSOR = ...
  24.  
  25.   ANIMATION
  26.   {
  27.     NAME="idle"
  28.     LOOPING=TRUE
  29.   }
  30.  
  31.   ANIMATION
  32.   {
  33.     NAME="hold"
  34.     LOOPING=TRUE
  35.   }
  36.  
  37.   ANIMATION
  38.   {
  39.     NAME="walk"
  40.     LOOPING=TRUE
  41.  
  42.     EVENT
  43.     {
  44.       FRAME = 4
  45.       NAME = "footstep"
  46.     }
  47.  
  48.     EVENT
  49.     {
  50.       FRAME = 16
  51.       NAME = "footstep"
  52.     }
  53.   }
  54.  
  55. }

2D actor definition files look like this:

Code: WME Script
  1. ACTOR
  2. {
  3.   NAME = "molly"
  4.   CAPTION=""
  5.   SCALABLE = TRUE
  6.   INTERACTIVE = TRUE
  7.   X = 400
  8.   Y = 460
  9.   SCRIPT="actors\molly\molly.script"
  10.  
  11.   FONT = "fonts\outline_red.font"
  12.  
  13.   ANIMATION
  14.   {
  15.     NAME       = "idle"
  16.    
  17.     LEFT       = "actors\molly\ll\stand.sprite"
  18.     RIGHT      = "actors\molly\rr\stand.sprite"
  19.     UP         = "actors\molly\uu\stand.sprite"
  20.     DOWN       = "actors\molly\dd\stand.sprite"
  21.  
  22.     UP_LEFT    = "actors\molly\ul\stand.sprite"
  23.     UP_RIGHT   = "actors\molly\ur\stand.sprite"
  24.     DOWN_LEFT  = "actors\molly\dl\stand.sprite"
  25.     DOWN_RIGHT = "actors\molly\dr\stand.sprite"
  26.   } 
  27.  
  28.   ANIMATION
  29.   {
  30.     NAME       = "walk"
  31.    
  32.     LEFT       = "actors\molly\ll\walk.sprite"
  33.     RIGHT      = "actors\molly\rr\walk.sprite"
  34.     UP         = "actors\molly\uu\walk.sprite"
  35.     DOWN       = "actors\molly\dd\walk.sprite"
  36.  
  37.     UP_LEFT    = "actors\molly\ul\walk.sprite"
  38.     UP_RIGHT   = "actors\molly\ur\walk.sprite"
  39.     DOWN_LEFT  = "actors\molly\dl\walk.sprite"
  40.     DOWN_RIGHT = "actors\molly\dr\walk.sprite"
  41.   }
  42.  
  43.   ANIMATION
  44.   {
  45.     NAME       = "talk"
  46.    
  47.     LEFT       = "actors\molly\ll\talk.sprite"
  48.     RIGHT      = "actors\molly\rr\talk.sprite"
  49.     UP         = "actors\molly\uu\talk.sprite"
  50.     DOWN       = "actors\molly\dd\talk.sprite"
  51.  
  52.     UP_LEFT    = "actors\molly\ul\talk.sprite"
  53.     UP_RIGHT   = "actors\molly\ur\talk.sprite"
  54.     DOWN_LEFT  = "actors\molly\dl\talk.sprite"
  55.     DOWN_RIGHT = "actors\molly\dr\talk.sprite"
  56.   }
  57.  
  58.   ANIMATION
  59.   {
  60.     NAME       = "turnleft"
  61.    
  62.     LEFT       = "actors\molly\ll\turn.sprite"
  63.     RIGHT      = "actors\molly\rr\turn.sprite"
  64.     UP         = "actors\molly\uu\turn.sprite"
  65.     DOWN       = "actors\molly\dd\turn.sprite"
  66.  
  67.     UP_LEFT    = "actors\molly\ul\turn.sprite"
  68.     UP_RIGHT   = "actors\molly\ur\turn.sprite"
  69.     DOWN_LEFT  = "actors\molly\dl\turn.sprite"
  70.     DOWN_RIGHT = "actors\molly\dr\turn.sprite"
  71.   }
  72.  
  73.   ANIMATION
  74.   {
  75.     NAME       = "turnright"
  76.    
  77.     LEFT       = "actors\molly\ll\turn.sprite"
  78.     RIGHT      = "actors\molly\rr\turn.sprite"
  79.     UP         = "actors\molly\uu\turn.sprite"
  80.     DOWN       = "actors\molly\dd\turn.sprite"
  81.  
  82.     UP_LEFT    = "actors\molly\ul\turn.sprite"
  83.     UP_RIGHT   = "actors\molly\ur\turn.sprite"
  84.     DOWN_LEFT  = "actors\molly\dl\turn.sprite"
  85.     DOWN_RIGHT = "actors\molly\dr\turn.sprite"
  86.   } 
  87. }