Adding first stuff

Adding the first stuff

By now you should have a Charakter in your project and created a Room . (If you have not downloaded a character you can use a single graphic and copy this image to all actions of the character... just so you have something that "walks" around the room) In this room you can drop a background image and after that edit the Walkmap so the floor is free to walk on. Now you can drag and drop your character into the room.

The game needs to know what room it should load first so now you have to edit the startscript "start":

loadroom (yourroom) setfocus (yourcharacter)

The focus command makes your character playable. This is the character that the player will control. Recreate your game and now you should be able to walk around your room.

Now we need something to interact with. Create an Object , no matter what. Use google to find a random thing maybe. Place your object into the room. If your object stands in the way you will have to edit the walkmap again. The objects script :

There should be some gamecommands like "look" added to the gamecommand list.

on (mouse) showinfo (Your object ; true)

This part has to be in every object, character or itemscript that shell react to gamecommands. Even if you do not use a "walk to" textline. The second parameter of Showinfo chooses if the text is visible next to the mouseicon. (True or false) Without a showinfo command you cannot use gamecommands with this object and the game will not check for scriptparts like on (look)

on (click) walkto (self ; x ; y ; view)

A single click with the mouse is intended to let your character walk to the object. "Self" means that the focused character will do the walking. X and y are coordinates on the walkmap. "View" is a number from 1 to 4. 1 front, 2 back, 3 right and 4 left. The coordinate on the walkmap has to be free or nothing will happen.

on (look) speech (self ; An awesome object in this room.)

With this the object will react to a gamecommand, in this case "look". The speech command can also be used with a charactername or "self". Important : The look event is delayed until the character reaches the destination from the Walkto command. Without the on(click) part there will be no delay.