Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Walk and run animation  (Read 3840 times)

0 Members and 1 Guest are viewing this topic.

Krosad

  • Anate Studio
  • Occasional poster
  • **
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 97
  • anatestudio.com
    • View Profile
    • Anate Studio Web site
Walk and run animation
« on: August 01, 2012, 08:13:14 PM »

Hi,

By default actor have walk animation. How to add run animation and associate its activation with some button?
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: Walk and run animation
« Reply #1 on: August 01, 2012, 09:16:16 PM »

There's no run animation by default. You simply create a run animation in the actor file. If you want to "run" on rightclick for example, you can do something like

on "RightClick" {
actor.WalkAnimName = "run"
}

on "LeftClick" {
actor.WalkAnimName ="walk"
}

Greets,

Spellbreaker
Logged

Krosad

  • Anate Studio
  • Occasional poster
  • **
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 97
  • anatestudio.com
    • View Profile
    • Anate Studio Web site
Re: Walk and run animation
« Reply #2 on: August 01, 2012, 09:40:54 PM »

and how to add some other animation after stop running?
« Last Edit: August 02, 2012, 08:23:50 AM by Krosad »
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: Walk and run animation
« Reply #3 on: August 02, 2012, 03:46:07 PM »

thats a bit more complicated if you need to "hit" a specific frame...you could start looking at actor.IsWalking() for example to check if he is walking . then you could create an event in your sprite to "jump" to a specific other frame or play another animation
Logged
 

Page created in 0.16 seconds with 21 queries.