The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: DoctorTodd on January 20, 2012, 12:49:13 AM

Title: [VX]Scripting Help
Post by: DoctorTodd on January 20, 2012, 12:49:13 AM
I'm pretty new to scripting and I'm completely stumped on my current script. I was wondering if some one could help me finish it. What I need to do is instead of a command window, make icons in those circles and write the name of what is on under the bar where it says main menu. I would also need to make the selector a circle to fit the icons. Here is a picture of what it looks like so far. If it requires some one to look at it then I will post it.
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg11.imageshack.us%2Fimg11%2F2145%2Fmenucf.png&hash=3d138ea03cae824264c56205fc23566a6555ec2c)
A quick question, is there a way to make the graphics and stuff glide on to the screen?
Title: Re: [VX]Scripting Help
Post by: DoctorTodd on January 21, 2012, 02:17:27 AM
I managed to get rid of the command window and created icons, I also made a circle cursor and I tried to do a thing with using input trigger to move the circle to each Icon but it didn't work. Can any send me in right direction on this?
Title: Re: [VX]Scripting Help
Post by: DoctorTodd on January 22, 2012, 05:55:55 PM
Alright I really need help now, what  I attempted to do was give every icon a number. So I would be trying something like this in every one.
if number = 1
    @cursor.x=132
    @cursor.y=265
    if Input.trigger?(Input::C)
      Sound.play_decision
      $scene = Scene_Items.new

Except it draws the cursor when it equals zero.

Then I would change the variable like this.
if Input.trigger?(Input::RIGHT)
      Sound.play_cursor
      number = number + 1
     
   elsif Input.trigger?(Input::LEFT)
      Sound.play_cursor
      number = number - 1
      unless number = 0
      Sound.play_buzzer
      end
    end
  end

This hasn't been working at all, so can someone please tell me how I can make it work.
Title: Re: [VX]Scripting Help
Post by: modern algebra on January 22, 2012, 06:00:46 PM
What methods are those in? Are they in separate methods? Why are you resetting the bitmap graphic every time?

If they are in separate methods then the number variable has local scope (unless you have defined methods for number and number=), so changing it in one does not change it in the other. If they are in the same method, is it all within a loop, or how is the value of the number variable being retained?

I need a lot more context to actually help you.
Title: Re: [VX]Scripting Help
Post by: DoctorTodd on January 22, 2012, 06:55:14 PM
Alright I sent you a PM with all the stuff.
Title: Re: [VX]Scripting Help
Post by: modern algebra on January 22, 2012, 07:18:18 PM
I'm pretty busy right now, but I will try to get around to it sometime this coming week.
Title: Re: [VX]Scripting Help
Post by: DoctorTodd on January 22, 2012, 07:20:12 PM
That's fine  :)
Title: Re: [VX]Scripting Help
Post by: LoganF on January 23, 2012, 02:03:45 AM
I don't know whether you got something about this:


if number = 1
    @cursor.x=132
    @cursor.y=265
    if Input.trigger?(Input::C)
      Sound.play_decision
      $scene = Scene_Items.new


It's a common problem to run into is this one. What you have is an assignment to n, not a comparison check. You need to change it to "if number == 1" for it to work properly. Otherwise, any value will pass the check as long as number can be given the value 1.
Title: Re: [VX]Scripting Help
Post by: DoctorTodd on January 23, 2012, 02:10:09 AM
Thanks I'll change that but I'm not sure if it will fix the problem.