Status
Not open for further replies.

rhyno435

Villager
Member
Joined
Sep 4, 2013
Messages
5
Reaction score
0
First Language
English
Primarily Uses
I'm just testing things out in this program, trying to figure out some programming basics for a game I plan on making in the future, so the test I have right now is pretty bare bones and silly.
 
I'm trying to create an event where you talk to a lady at an Inn, and if you don't have enough money, she turns into a demon and kicks you out. However, once the textbox pops up, a timer starts counting down, and if the player doesn't press anything before it reaches zero, I want an instant death and game over screen.
 
So far, I have everything working, except that after the timer runs out, the player needs to press a button to end the text box and trigger the death event. I'm hoping to be able to make the death event trigger even while the text box is still there, so it happens without the player pressing anything.  Is there a way to do that, or not? Any help would be appreciated, thanks!
 
Also, is there any way to have a timer count down but NOT be visible on the screen?

[IMG]http://img90.imageshack.us/img90/9030/3olk.jpg[/IMG]
Screenshot.jpg
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,789
Reaction score
15,916
First Language
English
Primarily Uses
RMMV
Use two events. One will be a parallel process conditioned by a switch, with the timer and what happens when it runs out. In your original event, instead of setting the timer and processing the results, just turn on the switch. Then the message will display, and the timer will begin, count down, and result in death whether the message is still on the screen or not.
 

Aeri_Sicher

Rookie Programmer! >.
Veteran
Joined
Jun 3, 2013
Messages
74
Reaction score
10
First Language
English
Primarily Uses
You can remove the timer permanently via script modifying, just change the value of self.visible to = false (Sprite_Timer Section):

  #--------------------------------------------------------------------------

  # * Update Visibility

  #--------------------------------------------------------------------------

  def update_visibility

    self.visible = false

  end

 

Edit: rookie scripter here. I actually don't know if this will affect other parts of the game unless I test the whole game... but we won't know unless someone tries it out xD
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,912
First Language
English
If you're not sure whether something will break or not if you make a change just search for all usages (unfortunately you're stuck with just doing a find-all and look for usages yourself) and determine when it's being used.
 
Last edited by a moderator:

rhyno435

Villager
Member
Joined
Sep 4, 2013
Messages
5
Reaction score
0
First Language
English
Primarily Uses
Use two events. One will be a parallel process conditioned by a switch, with the timer and what happens when it runs out. In your original event, instead of setting the timer and processing the results, just turn on the switch. Then the message will display, and the timer will begin, count down, and result in death whether the message is still on the screen or not.
I tried that, and it just ends up the same as how I had it before.  The timer starts and the text comes up, but I have to press a button to exit the text bubble before the events that come after it will play.  I'm thinking maybe if I put the actual text in a conditional branch, maybe that'll work.  I'll try it. Thanks for the advice.

EDIT: No dice.  I'm not sure what to do.  I know it's possible, because I've seen it done in Witch's House, at the part where

you touch a clock, and a text box comes up and then the clock crushes you before the text box even finishes, and you don't press a single button.
 
Last edited by a moderator:

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
277
First Language
English
Primarily Uses
RMMV
You'll need something to force-close the ShowText when the timer ends, like a script call. Should be possible with the default engine. (as in not adding new scripts but using a scripted function that already exists in the engine)
 
Last edited by a moderator:

HumanNinjaToo

The Cheerful Pessimist
Veteran
Joined
Apr 18, 2013
Messages
1,227
Reaction score
614
First Language
English
Primarily Uses
RMMV
Have you tried the command /| after the text. I believe it's the one that automatically closes the text box after one second. Using that, the player wont have to press anything.
 

rhyno435

Villager
Member
Joined
Sep 4, 2013
Messages
5
Reaction score
0
First Language
English
Primarily Uses
Have you tried the command /| after the text. I believe it's the one that automatically closes the text box after one second. Using that, the player wont have to press anything.
I found out about the in-text commands thanks to you :) So I found a way to make the text box close after the 10 seconds, but now I have the new problem that the player can't override the 10 second wait and exit the text box themselves.

EDIT: I found a way to make it work, and it actually works better than I intended.  Now I have it so that control is given back to the player, and they have to leave themselves before the timer runs out, rather than just being teleported out by the game. Thanks for the help.  Now I think I'm gonna try to make the death be caused by a piano rushing the player. Let's give that a try...
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,789
Reaction score
15,916
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

A shotgun is not a rifle. Huh.
SIGH its so hard to convince my friend that making a game for fun and making one to sell takes different planning. I don't care about weird bothersome ways of doing things in a game made for fun, but when you are planning to market it, there is some stuff that you just have to streamline or cut out.
It might be a little bit boring and tedious, but building that database of armor, items, weapons and skills are super important.
More words of wisdom: Trying to make everyone happy will just make you miserable.

Forum statistics

Threads
124,389
Messages
1,163,288
Members
163,191
Latest member
wxzlion
Top