 |

 How to talk to a character?
Game characters are objects (dynamic brushes) and
talking to them means displaying a few text messages when you interact.
Add such an object from the editor, with the desired tile, give it an unique id and set it's class property to action.
In the script write the ActionObject_ID callback for this object.
Here, use message functions to display texts at different coordinates, usually closer to the
character speaking. It's recommended to use diferent colors for each character in the conversation,
to keep it clear who's talking.
Read about messages in the Dialog messages chapter from the DizzyAGE book.
 How to give an item to a character?
To give an item to someone, you must have it in the inventory.
Use the character's UseObject_ID() callback and
check if the received index is the one of the item he needs.
For more info, read the Items Objects chapter from the DizzyAGE book.
 How to receive an item from a character?
To receive an item from someone, it's usually placed as disabled from the editor, next to the character that is supposed to give it to you.
When the time comes, enable the item by setting it's O_DISABLE property to 0.
For more info, read the Items Objects chapter from the DizzyAGE book and
the How to make an item appear or dissapear? article.
 How to make a character come and go?
That's easy! Just use it's O_DISABLE property to hide or show it.
Set it's position too, if he has to move arround the map.
Remember that when moving an object, from another room into the current one, you have to present it
with the ObjPresent() function.
If you need to animate it, as it enters or exits the room, do a small looping sequence
that changes it's position. For that you must be in a latent function.
Or can also update it on the room's update callback
and move it one step each frame, until it reaches the desired position.
 How to set the transparency of an object?
To be displayed with transparency, objects must have the SHADER_BLEND value in their shader property.
To set the transparency value, you must set the alpha channel of the current object's color.
For example, 0x80ffffff represents a half transparent color.
Setting the alpha to 00 will give you a totally invisible object.
Setting it to ff, as it is default, you will have an opaque object.
You can do a latent looping sequence and change the alpha value, to obtain a fading effect.
For more info, read the Tiles chapter from the Editor book and
the chapters about numeric formats and bit operations in the GS9 book.
 How to move a boat between two rooms?
To do so, you must change the boat object position, on the room's update callback.
If it's about more than one room, don't forget about using the ObjPresent() function.
An example of moving such an object is found in The rooms chapter from the DizzyAGE book.
If it's all in a cutscene, you can do the movement in a latent loop.
See the Cutscenes chapter from the DizzyAGE book.
|
 |