RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Scripting Questions :O!!

0 Members and 1 Guest are viewing this topic.

*
Meet me in the middle
Rep:
Level 89
or left of the dial.
For frequently finding and reporting spam and spam botsSecret Santa 2012 Participant
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.

*
A Random Custom Title
Rep:
Level 96
wah
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!
« Last Edit: August 03, 2007, 01:30:01 AM by mastermoo420 »

*
Meet me in the middle
Rep:
Level 89
or left of the dial.
For frequently finding and reporting spam and spam botsSecret Santa 2012 Participant
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.

*
A Random Custom Title
Rep:
Level 96
wah
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.

*
Meet me in the middle
Rep:
Level 89
or left of the dial.
For frequently finding and reporting spam and spam botsSecret Santa 2012 Participant
I still don't quite follow, how do I make it so when I press the Enter key, the picture dissapears?

*
A Random Custom Title
Rep:
Level 96
wah
Well, do conditional branches. The enter key in RMXP by default is actually the "C" button. So checking for C (which is really Enter)

*
Meet me in the middle
Rep:
Level 89
or left of the dial.
For frequently finding and reporting spam and spam botsSecret Santa 2012 Participant
I've tried everything you've suggested, it doesn't work.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
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.