Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Issue with Branch?, Frozen after hit
trhh
post Feb 1 2012, 03:54 PM
Post #1


Level 2
Group Icon

Group: Member
Posts: 18
Type: Mapper
RM Skill: Beginner




QUOTE
So i'm working on this ABS and I managed to get my character to "punch" when I hit the shift key. The issue is, he doesn't return to his default standing pose. He will just stay in his last frame punching pose. Am I missing something to add before the branch ends? Also Instead of using the shift key is it possible to use the "Z" Key? I read somewhere you could use any key you want if you know the key code? What's the key code for z?

QUOTE
Forget my original post I found the issue, it was my sprite sheet. However does anyone know how to make the Z key my punching key instead of Shift.


Sorry I keep answering my own questions and have new ones. But heres' my final/official one for this topic. Is it possible to have a Branch that does a random choice? For example I have sprite of someone who punches with there left hand every time from all four directions. I have the sprites for the Right punch but would like it so that when I press the punch button it will choose a random left punch or right punch to use? Does that make since?

This post has been edited by trhh: Feb 1 2012, 05:04 PM


__________________________
GET TO DA CHOPPAH!
Go to the top of the page
 
+Quote Post
   
Essenceblade
post Feb 1 2012, 06:36 PM
Post #2


Crystallite Hope.
Group Icon

Group: Revolutionary
Posts: 207
Type: Developer
RM Skill: Skilled




Do you mean a random chooser that determines whether they will hit with their main hand, or off hand? If so, that is rather easy, especially with a variable.

Firstly you need to make a variable and call it "Hit chooser"

Secondly, at the event in which your character punches, you need to choose a variable operation.

Make sure the variable being changed is the "Hit Chooser".
-Make sure the Variable operation is set to "Set Equal"
-Make sure the Operand is set to Random "Number Between"
-Set the first number in the box to 1, and the second on the box to 2

After that is done, you need to make a conditional branch.
-Make sure the Variable circle is ticked, and following that, the variable "Hit Chooser" is selected.
-Type the number in the box as 1, and the value to EQUAL TO.
-Un-tick the "Execute Custom Handler If Condition Not Met" box.
-Press Ok.

Make a new conditional branch exactly as the above, but this time set the number of the variable in the box as 2.

Your event for the punch would be like this verbally:

When you press the button, it will proceed to the "random chooser" section, which will then choose a random number in the range it was given--In this case it was 1 and 2.--and it will go either way. Because this is a two choice way. It will either be 1, or 2, you can set which direction under the IFs in the conditional branches.

You also want to remember that there is 4 ways your character can face. So to solve this, you need to make a conditional branch in the conditional branch which says:

"Conditional Branch is Var [XXXX: Hit chooser] Is X"

Under that, you need to put a conditional branch which checks the players direction. this is easily found under the conditional branch page on Tab 2.

Sprite: Hero is facing: Up.
-You need to change the graphic direction to the facing up direction. and repeat the above for every direction.

For the sake of confusion, here is an example of what I mean.



__________________________
My current project:


--------------------------------------------------






--------------------------------------------------



-------------------------------------------------------------------------------------------
"I want to have encampment dreams, where everything is as it seems, Harmony everywhere, finally there is peaceful air" -- Fatesboon. 11/4/2011
Go to the top of the page
 
+Quote Post
   
trhh
post Feb 1 2012, 08:23 PM
Post #3


Level 2
Group Icon

Group: Member
Posts: 18
Type: Mapper
RM Skill: Beginner




Thank you so much! I will dig into this give it a try. biggrin.gif

Wow, Worked like a charm! What I did was wrapped that entire chunk of code in a branch that was set so that when i press the number 1 it would work. And so it did! Thank you so much! If only every tutorial out there was as easy to follow as this one.

Try not to double post ~ Kayden997


__________________________
GET TO DA CHOPPAH!
Go to the top of the page
 
+Quote Post
   
Essenceblade
post Feb 1 2012, 09:29 PM
Post #4


Crystallite Hope.
Group Icon

Group: Revolutionary
Posts: 207
Type: Developer
RM Skill: Skilled




Glad I could help. laugh.gif Some tutorials are hard to follow, as to why I try and simplify them so that the reader actually understands visually and mentally.


__________________________
My current project:


--------------------------------------------------






--------------------------------------------------



-------------------------------------------------------------------------------------------
"I want to have encampment dreams, where everything is as it seems, Harmony everywhere, finally there is peaceful air" -- Fatesboon. 11/4/2011
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 June 2013 - 01:52 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker