Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
cdaz

Show Variable on Screen with Event ?

Question

I try to search Script for this but can't found one.

So I try to made it by Event.

 

I made Picture of Number 0-9.

 

Create an Event with Condition brunch to check if this variable (Named Killing Spree) = 0 Show Picture'0'

if this variable (Named Killing Spree) = 1 Show Picture'1' blah blah .

 

But the problem is when The variable reached to ten.

 

I don't know how to made how to reset Ones Place number to 10.

Same as Tens Place I don't know how to reset it to 0 when reached at 100.

 

And... another queastion this is not serious problem but I just curious.

why I can't use "Equal or Less" and "Equal or Greater"

When I try to make [if Killing Spree < 10] Show 0 (at Tens Place) ,[if Killing Spree >=10] Show 1 then it's not work.

But when I change to [if Killing Spree >9] it work with out problem.

 

I'm pretty sure I was use <=,>= a lot of time in my C# class at college but it never work on RMXP.
(I has this problem when I try to made my custome HP Gauge to)

post-28928-0-63799700-1440863333_thumb.jpg

post-28928-0-22386400-1440863338_thumb.jpg

Edited by cdaz

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hey cdaz! I'm not sure what you mean. If you want to reset the variable then you can easily add a command under the condition (If var == 10) and set the variable to zero. Also you can use "Label" command to jump to a previous line.

 

why I can't use "Equal or Less" and "Equal or Greater"

When I try to make [if Killing Spree < 10] Show 0 (at Tens Place) ,[if Killing Spree >=10] Show 1 then it's not work.

But when I change to [if Killing Spree >9] it work with out problem.

 

Do you get an error or something? Could you please be more specific about "not working"?

Share this post


Link to post
Share on other sites
  • 0

Youtube Video ->
Ah sorry for my unclear word.
For my main problem in this topic is when variable reach to ten
My first digit stay still at 9

So the number show on my screen is 1 2 3 4 5 6 7 8 9 19
What I want to know is how to make it 1 2 3 4 5 6 7 8 9 10
This VDO Clip maybe made it more clear about my problem.
 

And for my <= ,>= problem it just notting happen it act like the program can't detect These condition. Edited by cdaz

Share this post


Link to post
Share on other sites
  • 0

Of course, this is happening because you don't change the second digit as soon as it reaches 9. I think you should define two variables. One for the first digit and another one for the second digit. They increase together but the second variable resets to 0 when it reaches 10. So when you made two variables, Open the event that controls the second digit. On the last line, Set a new condition : if var == 10. Then reset the variable to 0 inside the condtiion.

 

About your second problem, I have no idea what's happening there. My simple suggestion is to test it in a new project to see if the problem resists.

Share this post


Link to post
Share on other sites
  • 0

oh you're welcome, I'm glad I could help.

By the way, if <= and >= don't work in a new and empty project, I think there is a problem with your engine, Like you're using a cracked version or something like that. If they work in a new project then you have a faulty script somewhere in the script editor of your game.

Edited by zahraa

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...