Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Transforming Skript! I need one!

I Need skript like this:
If i press "T" Button my hero will tranform to an Animal Spirit!:yes:
Please help me TY!:D

~Slaaperz @_@
 
Create a parallel process common event:
Code:
>Button Input Processing: [xxxx: Button Pressed]
@>Conditional Branch: Variable [xxxx: Button Pressed] == 11
    @>Conditional Branch: Switch [xxxx: Morphed?] == OFF
          @>Set Move Route: Player
                @>Graphic: "Name of transformed sprite"
          @>Control Switches: [xxxx: Morphed?] = ON
    @>Else
          @>Set Move Route: Player
               $>Graphic: "Name of original sprite"
         @>Control Switches: [xxxx: Morphed?] = ON
    @>Branch End
@>Branch End
(That isn't actually code, it's what the event will show.)
This will make it so that you change when you hit SHIFT. I don't think T is possible (feel free to correct me though). Much easier than scripts IMO. Hope that helps.
 
To make "T" button accessible, you need Near Fantastica's Keyboard Module (correct me if I'm wrong). In this case, you can't really make a parallel process (slower than script I think). Try to provide the link to that script (lazy me :D), I'll try scripting it if you need so.
 
Please try making that and is it possible that the transforming would be avaible when you play the game to further state... like you must beat the spirit first and then you can transform to it? that would be so... 8-)
TY for replying! :yes:
 
I see there's some confusion here, so let me ask one question:

When you mention "T" button, you mean the letter "T" on the keyboard, don't you? RMXP only knows A B C X Y Z L R button, so that link above will not work. So far as I know, Near has made a Keyboard module that allows any keyboard input.

If anyone know a better script that allows keyboard input, let me know. Apparently I have Near's Keyboard Module Input, but it's version 5 for SDK 1.3. Any newer version?
 
Hmm... if normal RMXP buttons, it would be easier then.

I'll try making one. Just checking what you want:

1. The transformation will be done at map.

2. Need to do some actions first to activate transformation.

3. All actors (or some) will be able to transform.

But it will be non-SDK. Is it OK with you?
 
Usually I limit myself using common event, but for now Bearcat it right: it's easier using common event. Note that SHIFT is actually RMXP's A default button, so it's the same as pressing Z in your keyboard.

I'm on my way scripting right now, but for now let me tell you how to do it with common events.

1. Go to your game database (press F9).

2. Open Common Events tab. By default, you see one empty page (since common events are not necessary in some cases). If you don't have any empty page left, increase the maximum amount of common events by clicking Change Maximum... button. Either way, choose an empty page, name it as you want.

3. Change the Trigger to Parallel. This means this common event will always run in the background, waiting for a condition to be met. This condition is a switch being turned on. Now, since you want it to be accessible only by some means...

4. Click the triangle next to Condition Switch box to open Switch window. Choose a new switch (name it as you like but easy to remember and reasonable). For example, I choose switch 0002 named Morph unlocked. Press OK.

You should go back to your game DB window. Now, we make the commands to check what button is pressed and transform the player if necessary. This is how you should do.

When I tell you to make an X event, double click on List of Event Commands area. I'll tell you where to double click.

5. Make a Battle Input Processing event. Assign a variable for it. For example, I set it to variable 0001 named Button.

6. Make a Conditional Branch event below (5). Find Variable, set it to the variable you used at (5), make sure the operator is Equal to, choose Constant, and enter one of this number, corresponding to which button you'd like to set for morphing:

RMXP Button = Number
A = 11
B = 12 (DON'T USE THIS; it's menu calling button)
C = 13
X = 14
Y = 15
Z = 16
L = 17
R = 18

Uncheck Set handling when conditions do not apply. Click OK.

7. Inside (6) (double click after Conditional Branch: Variable ...[/b]), make another Conditional Branch event. This time, select Switch, choose a new switch (let's say switch 0001 named Morph. Make sure the condition is OFF and Set handling when conditions do not apply is checked. Click OK.

8. Inside (7) BUT BEFORE Else, make a new Set Move Route event. Select Player. Click Change graphic... and choose the animal character set. Click OK.

9. Below (8), make a new Control Switches event. Set the switch you used in (7), so far switch 0001, to ON.

10. Inside (7) AND AFTER Else, do pretty much the same as (8), except now choose the actor's original character set. Do also (9), but now switch it OFF.

Done! It will look something like this:

By using common events, though, the hero only transforms at the map. If you check your menu while s/he is transforming, you will see s/he doesn't look like have transformed.

To try this, you must have the Morph unlocked switch already turned on. Make an event to turn it on (I assume you're already goot at events so far).

If this could not satisfy you so far, tell me and I'll continue my scripting.
 
Okay.

By the way, if actor 1 is transforming then I open the menu, will s/he stay in that form or else?

Let's say actor 1 is Arshes. I transformed Arshes to cat. When I open the menu, will Arshes show as cat or himself?

And when entering battle, will his battler graphic change as well (show as cat or Arshes himself)?

For now, I'll leave that to setting part of the script, so you can change them later.

EDIT:
Forgot one thing..

Will transformation button (Arshes to cat) be the same as detransformation button (cat to Arshes)? And do you still need the condition to activate the transformation (e.g. when a switch is turned on)?

It's almost complete FYI.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top