Help - Search - Members - Calendar
Full Version: Events acting up
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
DJ990J
I have two events and there beside each other
they both have this

\v[2] is suppose to be 0, 1, or 2 but it keeps coming up
as 0, then when I look in items there is 1 or 2 apples there


like so

How would I fix this?
please and thank you smile.gif
stripe103
That is because the \v[2] should have the variable that you want to show in it, in this case it shows the variable 2. Since you are using the variable 26 for the random number you need to have \v[26]
DJ990J
QUOTE (stripe103 @ May 30 2010, 09:44 PM) *
That is because the \v[2] should have the variable that you want to show in it, in this case it shows the variable 2. Since you are using the variable 26 for the random number you need to have \v[26]

Oooh thank you very much I learned something biggrin.gif
Redd
Darnit man got to it before I did!! I was going to say just do a conditional branch with all the levels of apples inside it, but that would take a really long time to do and would be less efficient.
stripe103
And I wrote it on my phone biggrin.gif tongue.gif

But to make Redds idea better you could do this:
CODE
@>Text: Kick the tree?
@>Show Choices: Yes, No
  :  When [Yes]
  @>Show Animation: [EV014], [Hit]
  @>Text: You kick the tree
  @>Control Variables: [0026: apples] = Random No. (0...2)
  @>Comment: If the variable is greater than 1
  @>Conditional Branch: Variable [0026] > 1
     @>Text: You have gotten \v[26] apples
  :    Else
     @>Text: You have gotten 1 apple
  :    Branch End
  @>Change Items: [Apple], + Variable [0026: apples]
  @>Control Variables: [0027: apples_have += Variable [0026: apples]
  @>
  :  When [No]
  @>
  :  Branch End
@>


Now, instead of having it writing:
CODE
You have gotten 2 apple(s)

you can have it write
CODE
You have gotten 2 apples

or
CODE
You have gotten 1 apple

which is making the game look better(in my opinion tongue.gif )

So you just add
CODE
@>Conditional Branch: Variable [0026] > 1
     @>Text: You have gotten \v[26] apples
  :    Else
     @>Text: You have gotten 1 apple
  :    Branch End

where the text is supposed to be
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.