Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sun 12/02/2006 13:45:12

Title: animation after dialog, and death
Post by: on Sun 12/02/2006 13:45:12
I have a room with a dragon in it, the dragon is not really a character, its a part of the backround image, put ive painted a hotspot over is, so the player can talk to it and see it.
ive painted a sequence of 7 images of fire coming out of the dragons mouth.

1. How do i now put this images on the dragon, when the players says the wrong thing in the dialog to the dragon?
2. How do i write a "your dead now, restart game?" textbox after it?
Title: Re: animation after dialog, and death
Post by: Ashen on Sun 12/02/2006 14:02:51
1.
Use an object. Uncheck the 'Object is initally visible' box in the editor, and just turn it on & animate it when you need to.
(Useful BFAQ entry: Running regular code in dialogs (http://americangirlscouts.org/agswiki/index.php/Scripting%2C_Code_%26_Interaction#Running_regular_code_outside_dialog)).

2.
Depends.
If you just want a text box, use a Display(..) command followed by whatever you want to happen, e.g.:

Display("You're dead. Get ready to try again...");
RestartGame();

(BFAQ: How to win/lose/kill off your character (http://americangirlscouts.org/agswiki/index.php/Graphics%2C_Characters%2C_Text_%26_Rooms#How_to_end_your_game_.28win.2Flose.2Fdie.29_or_kill_off_your_character). In fact, take a look through the BFAQ next time you have a question - it might well be in there already)
Or, you might want to create a GUI with Reload/Restart/Quit buttons on.