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: Complex Walking Tutorial?  (Read 3432 times)

0 Members and 1 Guest are viewing this topic.

craigp

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
    • View Profile
Complex Walking Tutorial?
« on: July 09, 2008, 10:04:46 PM »

I'm not terribly far into making my first Wintermute game, but one thing I want to do is have much better animations than the examples give. For example, I'd like to have a "stop walking" animation, which someone also talked about here: http://forum.dead-code.org/index.php?topic=2942.0

But I have a few problems.

I tried to use the "stand" animation. For some reason it never resets, so it plays to the end and then never plays again, even if you walk around and then stand again: you just get the last frame. Making it loop definitely doesn't help, because it's completely desychronized at best.

So an approach like Spawn's might be best... except I don't know where he's putting that code. Is it overriding the default walking code? If so, how do I do that? I wouldn't want to put that code into every room if I can avoid it.

Also, I need to get the animations to play to the end, rather than cutting off whenever is convenient, but the "continuous" switch is marked as "not implemented" in the help. Is there any way to do this easily? Otherwise, transitioning to another animation skips distractingly.

The stand animation itself... I guess I need to add custom animations for various fidgets and call them on some kind of timer that starts up whenever you stop moving? Is there a tutorial out there?

-Craig
Logged

manarius

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
  • node it. node it all together my brethren :)
    • View Profile
    • Thats one of our Games :-)
Re: Complex Walking Tutorial?
« Reply #1 on: July 10, 2008, 12:49:38 PM »

you just take the actor.script.
in this script you can add a
method GoTo(X,Y){} function call.
the X and Y are important, you can add other parameters though.

inside this function call you can asign the things you want to, even this code snippet you mentioned

hope that quick tip will help :)
have fun
manarius

(the stand animation works perfectly for me, maybe something in your code is messing this up.)
Logged

craigp

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
    • View Profile
Re: Complex Walking Tutorial?
« Reply #2 on: July 10, 2008, 05:08:20 PM »

Okay, so that simply overrides the default? I'll try it, thanks.
Logged

manarius

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 27
  • node it. node it all together my brethren :)
    • View Profile
    • Thats one of our Games :-)
Re: Complex Walking Tutorial?
« Reply #3 on: July 11, 2008, 02:42:11 PM »

oooh sorry i forgot one thing, but i think you found it out already.

inside the GoTo(X,Y){}

has to be the function call AGAIN, something like:

GoTo(X,Y){
   your script;
   GoTo(X,Y);
}

otherwise the actor wont move...

greetings again
manarius

Logged

craigp

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
    • View Profile
Re: Complex Walking Tutorial?
« Reply #4 on: July 11, 2008, 02:45:36 PM »

I figured. It worked well, thanks!
Logged
 

Page created in 0.041 seconds with 24 queries.