CRE8OR - game maker for anim8or

 


SEQUENCES AND MODES
- CHARACTERIZATION -


   We'll start out wit a project similar to last time. Download this: Lizard Alien. It was given to me by MovieCGI from the anim8or forum. I've added all the basic movements so we can start learning about modes and sequences. You might want to review Direction, Camera and Movement.

NOTE: Models are used in the tutorial for the purpose of teaching, these models are not allowed to be used elsewhere without consent.

Now let's begin. Start up Cre8or and open Lizard Alien.

Now let's review

  • The object "Level" has it's physical properties set to "Static Mesh"
  • "Alien_Lizard" Create event:
    • Camera 3rd Person:
      • Height: 180
      • Distance: 180
      • Height Offset: 50 (makes the camera look more at the head than body)
      • Direction Offset: 90 degrees, looks behind the character rather than side
      • Orientation Sync: OFF, UNchecked, no syncing
    • Direction Flow: 25, makes the camera smoothly turn around
    • Linear Flow: 17, makes the camera smoothly move towards character
    • Create Animation Tracks: 1, only need to play one sequence at a time
  • "Alien_Lizard" Step event:
    • Stand Straight, use sequence #0 , because #0 is IDLE
    • Apply Damping (0.6, 0.0, 0.6) makes the character have more friction
  • "Alien_Lizard" LEFT/RIGHT event:
    • Turn character
  • "Alien_Lizard" UP/DOWN event:
    • Move forward force: 2000, use sequence #1 because #1 is RUN
  • "Alien_Lizard" Physical:
    • Don't AUTO UPDATE FROM AN8 FILE!
    • Use sphere with Radius 42, found this value to be nice
    • Density: 0.3, lighter
    • Bounciness: 0.0, not bouncy
  • Scene01
    • No ground grid!
  • Game Options -> Physics -> SMG Scale: 0.05, make it more reactive

The first thing you notice when you play it is that the lizard looks odd when he turns around. To fix this up a bit I want to play the "RUN" animation for the lizard when he turns.

Drag the "Set Sequence" action into the <RIGHT> event in the Lizard_Alien object

Use sequence #1, because #1 is the RUN animation

Looks like:

Now add the same action to the <LEFT> event, you can Copy the action if you so desireCTRL+C, or right click "Copy."

There could be a better animation for the turning, but this is good for now.

Notice that there's a great chasm in the middle of the scene. In order to get over that chasm, our character will have to be able to jump. I'll tell you how the sequencing works, as long as you use "Set Sequence" that sequence will be played and the frames will move on. So basically we want it to "Set Sequence" of the jump sequence for as long as the jump sequence is. And at around frame #14 we want to apply a upward for to the character.

It is time to use modes. We'll use simple modes, two modes, "Normal" and "Jumping" During his "Normal" mode nothing happens. During his "Jumping" mode we play the jumping sequence.

Add a new mode

and call it "Normal"

Now add a another mode. And call this one "Jumping"


Now add the "Set Sequence" to the "Mode: Jumping" event.


Now set the sequecne to 3, because that's the jumping sequence:

We want to make that the first mode is "Normal" so...
Drag the "Set Mode" from character tab to the "Create Event"


Set the "Mode Name:" to "Normal"


Now add the "Keyboard" <SPACE> event, and add a "Set Mode" this time use "Jumping"


Now Run the game and when you press <SPACE> the lizard thing should start his jumping sequence. The only problem is that it never stops. And it never jumps up.

Double click the "Jump" sequence:



Go to "Add Event" and select "Frame 59" the last frame



Now drag the "Set Mode" and use "Normal"


So on the last frame. It will make sure that it is no longer "Jumping"

Now when you run it he should jump when you press <SPACE> and then stop at the end. Now we need to apply a upward force. Add a new event to the sequence, this time, add "Frame 10"

Now add "Upward Force" from the Physics tab


Use 30,000 for the force
And 0.01 for the duration. If the duration is less than "0.0" then it will be instantaneous force, that is it will be immediate, the 0.01 duration allows it to be more smooth, by being more of a impulse.

Now if you run it you'll be able to actually jump up. The only problem is that you don't really need to be on the ground in order to jump, which is incorrect.

Go back to the <SPACE> event in the Lizard Alien Object, and add a "If On Ground"


Set it to "43" which is just a little bit bigger than the radius of the object, if you recall.

Basically it shoots a ray straight down from the objects mid point to see if it hits anything. If it does then the character is on the ground.

Make sure it's above the "set mode"

Now jump across the chasm

Now jump up the white steps.



Find the prize



Except one last thing. I want the prize to spin around. The ball thing has one sequence that spins it around.

Now go to the Ball figure, add the Step Event

Add the create event

In the create event add "Create Tracks," and "1" is fine.

Now in the "Step" Event Add "Set Squence" is "0"

Now the ball should spin around.

Tutorials Page




Copyrights (C) 2007 Keith Tabert
Thanks to R. Steven Glanville for Anim8or, Robin