Creating and understanding actors

From Game Editor

Jump to: navigation, search

Actors are the objects in Game Editor. Without actors you won't be able to make a game. Actors receive events, have animation, and anything you will need to make a game. They can be used for backgrounds, your main character, enemies, environment and much more. Learning how to use actors is essential in the use of gameEditor.

How to add a new actor

When in the editor, go to the menu/toolbar at the top of the screen. There is a button with the text "Add Actor". Click on that button and there appears a new window. You can type the name and the kind of the new actor now. Click on "Add" to add the new actor.

How to add an actor

Kinds of actors

In Game Editor you can use five different kinds of actors: the view, a normal actor, a filled region, a wire frame region and a canvas.

View

The view is a really special actor. You can give it events and actions like to any other actor. You can't add any new views because the view can only exists once in a game. You can get the view coordinates with another actor using view.x or view.y.

Normal actor

You can add as many actors as you like. When creating an actor, it has got the game editor logo as his animation. That will also be visible when playing the game. You can replace that with another animation.

Wire Frame & Filled Regions

Both act as "boxes" that are invisible during game mode. Wire frames only collide arround the edges, aka the frame, while filled regions can collide anywhere inside the region. Drag a corner to make the region bigger or smaller. Drag anywhere else to move.

Filled regions can also catch mouse clicks.

Canvas

A canvas is almost the same as a filled reigon, but you can also draw anything on a canvas using the draw funcitons. You can't change the size during the game.

A canvas can be used for collisions and can also catch mouseclicks.

A canvas can only catch a mouseclick or collide on an area of it that has some drawing content;