Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 


———
Before you ask! Read! ;)

You must have 30+ Posts to create a topic here!

Thanks for reading!
———

> Event trigger labels
Tsukihime
post Jun 13 2012, 01:36 PM
Post #1


Level 25
Group Icon

Group: Revolutionary
Posts: 560
Type: None
RM Skill: Undisclosed
Rev Points: 25




Looking for someone to write this script. It is not complicated actually.

This script will allow you to setup events in such a way that the player can press a certain key to trigger the event, and then the event will jump to a specific label depending on which key was pressed.

For example, by default, the "confirm" key is used to trigger "action trigger" events through :C (or the Z key)
But what if instead of executing all of the commands, we only execute some of them?

An example setup would be like

CODE
#==================#
#Label: Z
"talk?"
#==================#
#Label: A
"steal?"
#==================#
#Label: S
"battle?"


Where different parts of the event are executed depending on which key you pressed.

Ideally, you would make use of labels because now you just say "go to label C if C is pressed" or "go to label A if A is pressed".

In fact, the implementation of this script may become really easy with the use of labels.
All you have to do is jump to the specific label based on the key you pressed and then execute it normally. You might not even need to mess around with even triggers!

You then just have to make sure that you break out of the event when you reach another label.

This post has been edited by Tsukihime: Jun 13 2012, 02:00 PM


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies
Tsukihime
post Aug 18 2012, 07:36 PM
Post #2


Level 25
Group Icon

Group: Revolutionary
Posts: 560
Type: None
RM Skill: Undisclosed
Rev Points: 25




I have updated the script to automatically separate each "input branch" from one another. I don't think there is any reason why someone would want to allow the rest of the commands to run if they're going to use specialized branches anyways. But maybe if someone brings up a point...

This only occurs when you are using the specialized input branches.

I simply went through the page while it's setting itself up and inserted Exit Event Processing commands before each input branch label.
eg:

CODE
Label: Input.trigger?(:C)
Show Text: Do this
Exit Event Processing #automatically added
Label: Input.trigger?(:B)
Show Text: Do that


This ensures that when you press C, you are getting only the stuff that should be shown under the C branch.

I also fixed the extra buttons since it was just assigning, and not combining the different keys.

I also changed it so that if they don't like to type `Input.trigger?` they can change it to whatever they want.
However they still need to type the buttons in parenthesis.

http://db.tt/MUvL8AfU

This post has been edited by Tsukihime: Aug 18 2012, 08:40 PM


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 01:26 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker