How to jump and event help..

Joined
Jun 26, 2012
Messages
209
Reaction score
9
First Language
English
Primarily Uses
Hi guys..... so i finally got my swimming sprite for my character...so i am using this common event to change actor's graphic.....

CHANGE ACTOR GRAPHIC DEPENDING ON LOCATIONThis event is just as simple as the previous one. What it does is change the actor's graphic depending on their location - so if they are swimming it will automatically change to a swimming graphic, and back to a walking graphic if they go on land.

The first step is to create a common event named Swimming (or whatever you want) with a Trigger: Parallel Process and a Condition Switch: Swimming. You will need to set three variables: one for the player's X value, one for the player's Y value, and the last to hold the location info value (you can reuse the ones in the previous code if you're using them both). The code inside the event should be as follows:

Control Variables: [0001:X] = Players Map X

Control Variables: [0002:Y] = Players Map Y

Get Location Info: [0003], Terrain Tag, Variable [0001][0002]

Conditional Branch: Variable [0003:Location Info] == 1

Change Actor Graphic: [Eric], 'swimming eric', 0, 'Actor4', 0

Else

Change Actor Graphic: [Eric], 'Actor4', 0, 'Actor4', 0

Branch End

And that's the entire code! Now you have two more steps, but they are relatively easy. The first is to go to tileset -> terrain tag and denote whatever tiles you want to change the graphic while on. I used the coast tiles in the A tab. The second step is for you to change the passage setting for those tiles so the player can freely enter and exit them. And that's it! You can use the darker ocean tiles as a border to keep the player from swimming too far into the water, and If you want to keep the player from swimming entirely, simply flip the Condition Switch: Swimming off.
So... i wanted to trigger an event as soon as the player reaches the water saying... " do u want to swim " or something like that and then the player jumps and then the graphic changes... so i can use Victor sant's jumping script but how do i use it with this common event
 

Kilravok

Veteran
Veteran
Joined
Jul 18, 2012
Messages
73
Reaction score
4
First Language
English
Primarily Uses
RMMV
After "Conditional Branch: Variable [0003:Location Info] == 1", enter a show text "Do you want to swim?" followed by show selection Yes/No.

Inside the Yes answer, you set the conditional branch "Change Actor Graphic: [Eric], 'swimming eric', 0, 'Actor4', 0" and turn on self-switch to avoid having the question pop up every step/frame. On the second page, you again start the same as on the first but the conditional branch altered to "Conditional Branch: Variable [0003:Location Info] != 1" (!= sets the condition of "is not") and follow up with the "Change Actor Graphic: [Eric], 'Actor4', 0, 'Actor4', 0" if the condition is met and end the branch with self-switch off, which will bring it back to page one.

Only weakpoint in my answer that I can see, I have no iea how to prevent you from walking into the water when you choose not to swimm. Maybe it would be better to just let the player swim automatically as the original intents.
 
Joined
Jun 26, 2012
Messages
209
Reaction score
9
First Language
English
Primarily Uses
Ok i got that but there is one more problem the player graphic changes before going into the water.. what's happening???

here is a screenshot

swim.png
 

RyanA

Happy Cat
Veteran
Joined
Jun 28, 2012
Messages
2,423
Reaction score
230
First Language
English
Primarily Uses
Ok i got that but there is one more problem the player graphic changes before going into the water.. what's happening???

here is a screenshot

View attachment 791
Have the character jump into the water, wait for completion, THEN change the graphic! That should work then :3
 
Joined
Jun 26, 2012
Messages
209
Reaction score
9
First Language
English
Primarily Uses
I'll try what u said but i think its because im using pixel movement script of victor sant...... whaddya think??
 
Last edited by a moderator:

RyanA

Happy Cat
Veteran
Joined
Jun 28, 2012
Messages
2,423
Reaction score
230
First Language
English
Primarily Uses
I'll try what i said but u i think its because im using pixel movement script of victor sant...... whaddya think??
Maaybe....I thought that the jump command did it in tiles, maybe victor script changes that though 3:
 
Joined
Jun 26, 2012
Messages
209
Reaction score
9
First Language
English
Primarily Uses
OK forget about the stupid text... its not working......i just want to jump before going into water... but i can't because im using terrain tags so it starts jumping before going into water and then never stops :(

EDIT:- if i don't want to jump through events but through victor sant's script, how do i limit myself that every time i reach the edge i have to press jump button before going into water??
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,845
Messages
1,016,961
Members
137,561
Latest member
JaCrispy85
Top