The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: firerain on August 03, 2007, 01:07:16 AM

Title: Scripting Questions :O!!
Post by: firerain on August 03, 2007, 01:07:16 AM
I'm a noob at scripting, so I was wondering what and how to make a small script where it shows a picture made in photoshop, the person presses enter and it closes, I tried doing it with events, but that failed. I also want to know how to make the script for when I hold a certain key(SHIFT) my character sprints not just walks.
Title: Re: Scripting Questions :O!!
Post by: Kokowam on August 03, 2007, 01:24:20 AM
Sprinting, that can be done with events. You just need another spriteset. The picture thing, I think it can be done with events and loops (99% sure). Brb. Lemme test.

EDIT: Okay. I haven't tested but I think this will work. Here's what the event should look like:

@>Text: Show picture?
@>Choices: Yes, No
  :  When [Yes]
    @>Show picture blah blah blah...
    @>Loop
      @>Conditional Branch - Check if key whatever is pressed
        @>Break Loop
      :   Branch end
    :   Repeat Above
    @>Remove Picture #
  :   When [No]
    @>
Branch End
END!
Title: Re: Scripting Questions :O!!
Post by: firerain on August 03, 2007, 01:31:50 AM
I've tried that, the key thing doesn't work. Even if it did, the list doesn't have all the keys, and some of them are wrong, for example, Z ended up being F..or whatever it was.
Title: Re: Scripting Questions :O!!
Post by: Kokowam on August 03, 2007, 01:32:55 AM
That's because you set it in the controls when you press F1 when you start the game... C = Enter/Spacebar. B = ESC/X. Etc.
Title: Re: Scripting Questions :O!!
Post by: firerain on August 03, 2007, 01:35:39 AM
I still don't quite follow, how do I make it so when I press the Enter key, the picture dissapears?
Title: Re: Scripting Questions :O!!
Post by: Kokowam on August 03, 2007, 02:06:03 AM
Well, do conditional branches. The enter key in RMXP by default is actually the "C" button. So checking for C (which is really Enter)
Title: Re: Scripting Questions :O!!
Post by: firerain on August 03, 2007, 03:19:53 PM
I've tried everything you've suggested, it doesn't work.
Title: Re: Scripting Questions :O!!
Post by: modern algebra on August 03, 2007, 03:28:51 PM
Demo attached.

I did it a little differently, using Key Input Processing instead, but moo's way would also work, I just don't like using loops.