Post new topic    
Liquid Metal Slime
Send private message
technical help 
 PostWed Feb 02, 2011 3:02 pm
Send private message Reply with quote
A few questions:

---- First ----

In a section of my game when certain NPCs touch you, you die. I'm doing this by making a touch trigger NPC that loads a text box.

This first text box says "You've been caught!" and then skips to another text box.

The second text box has a full screen background and is the default Game Over text box for my game which loads a text box that says "Game Over" and then runs this script (the syntax might not be quite right, I'm typing in this post from memory):

plotscript, endthegame, begin
game over
end

However, when that script is done it flashes the game screen (as it was before you died) for a 1/2 second before kicking you back to the title screen. It's not a big deal but it looks a little sloppy and I'm trying to fix it. Does anyone know what I'm talking about and if there is a work around for this?

---- Second ----

Is there anyway to freeze NPCs during a text box? Here's my example. I have certain NPCs that chase the player and kill him by touching him. However, some of the rooms have descriptive text boxes and if you bump into one of these boxes then NPCs will rush you while you read it. How can I suspend time while a text box is open?

Thanks for your help guys!
Liquid Metal Slime
Send private message
 
 PostWed Feb 02, 2011 3:28 pm
Send private message Reply with quote
For #1, try this:

Code:

plotscript, endthegame, begin
showbackdrop(x)
#X is the number of the backdrop you are using in the last box
game over
end


For #2:
Use this script instead of just calling the text box:
Code:

suspend player
suspend npcs
show text box(x)
wait for text box
resume npcs
resume player

My website, the home of Motrya:
http://www.jshgaming.com
Liquid Metal Slime
Send private message
 
 PostThu Feb 03, 2011 1:27 am
Send private message Reply with quote
The second bit of code worked great. Thanks so much! But something is strange with this bit below:

Code:

plotscript, endthegame, begin
showbackdrop(x)
#X is the number of the backdrop you are using in the last box
game over
end


The code seems to work (it is compiled without an error) but backdrop 0 doesn't actually show up. I've tried phrasing it as "showbackdrop(0)" or "show backdrop(0)" but neither does anything. I went through the wiki and according to it, the syntax is correct.
Super Slime
Send private message
 
 PostThu Feb 03, 2011 1:50 am
Send private message Reply with quote
Yep, syntax is correct. But you're not pausing the game between showing the backdrop and ending the game. You probably want either wait for key(use key) or wait(ticks). Minimally, wait(0) will make the backdrop show up before the fade.
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Display posts from previous: