Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
GermanyXItaly1000

Button Pressing Problems.

Question

I'm trying to make a gun system composed of variables and conditional branches to allow the player to use a gun and shoot enemies with it on the map.

 

Unfortunately, I've started working and it seems that my conditional branch involving a button being pressed doesn't really work.

 

There's a file I've attached here: post-24661-0-20929400-1376684914_thumb.pngpost-24661-0-20929400-1376684914_thumb.png

 

I have the revolver in my inventory, two of the same item once I playtested again to make sure it wasn't wrong, and I'm pressing down on Z. I tried pressing once and holding down on it, and it doesn't work. The character (Italy) doesn't jump, and the sound doesn't play, either.

 

This is just starting to get worked on, so I don't have the bullets or anything yet, either. .-. To think I've encountered a mistake/problem so early in my system is, well, pretty discouraging.

 

If anyone can help with this button problem, I'll be really grateful.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

It's cool what you're trying to do, unfortunately using this method to shoot enemies is essentially like touching events at long distance and isnt easily done with common events. What you need is a ruby script which will allow you to do this.

 

If this is going to be the main method of battle for your game you'll run into a huge array of issues about making enemies, AI controls, battle field hp and skills etc. My advice would be to try Mr. Mo's ABS

 

There is also the Project Zelda Engine which has a wide array of items that work similarly, but it isn't complete yet.

Share this post


Link to post
Share on other sites
  • 0

It's cool what you're trying to do, unfortunately using this method to shoot enemies is essentially like touching events at long distance and isnt easily done with common events. What you need is a ruby script which will allow you to do this.

 

If this is going to be the main method of battle for your game you'll run into a huge array of issues about making enemies, AI controls, battle field hp and skills etc. My advice would be to try Mr. Mo's ABS

 

There is also the Project Zelda Engine which has a wide array of items that work similarly, but it isn't complete yet.

Thanks, but for some reason, the downloaded game isn't working; now that I think about it, I'm sure I've tried it before, but the game isn't supported by my version of RMXP. It was probably for an older version.

 

So I'm left with... zero ideas?

 

My thought was that I could use variables as bullets, and as you shoot by pressing on the Shift key, you use up one variable with each blast, which is accompanied by a movement (stepping backwards) and a sound, maybe an animation if I'm up to making one. When the variable reaches 0, a conditional branch I've made is activated that says "Reload".

 

So far, so good. I have the shooting, the movement, the surface action done.

 

And the only problem I actually have is to create several conditional branches that relate the the person the player is trying to kill (you only kill one person at a time, it's like an assassination thing, I guess?), and I've lined up the x variables and y variables of the player to match with the person's, so that when you fire from below, above, or the sides, you can "shoot" them, and I would build up the variables for the person's death. Basically, if I manage to shoot from either one of the said directions, the person would accumulate a variable for his/her death with each shot, and once it reaches a certain number (in my case, 4), the person "dies".

 

I got this done with a common event activated by a parallel process when the player receives the gun.

 

Well, I've only encountered a few problems:

-I can't figure out how to make my player have to face the event to actually shoot him (like, you can't be looking away from him and still be in the line of fire and be able to still actually shoot him)

-I really can't figure out the variable system; something's wrong with the way the variables act, because apparently I can shoot 2 rounds at the event and before I even manage to get off a third, he collapses with the text that appears when the conditional branch for the death variable is equal to 4. I don't know how it gets from 2 to 4 like that.

 

I have screenshots of the events I've used related to this system (which is relatively easy, since there's only one guy to take out, and I have no hope for Mr. Mo's ABS since it's not supported with my editor :().

 

http://www.gdunlimited.net/media/uploads/manager/gun-loading-24661.png

http://www.gdunlimited.net/media/uploads/manager/shooting-the-event-24661.png

http://www.gdunlimited.net/media/uploads/manager/shooting-24661.png

 

... Yeah, I'm pretty sure this is somehow wrong, either it's kinky in the branches (like... I set it up incorrectly?) or something else. And I still don't know how to make the player face the event (if he's moving around, even if he's just stationary).

 

If anyone would help, I'd be super grateful.

Share this post


Link to post
Share on other sites
  • 0

 

hanks, but for some reason, the downloaded game isn't working; now that I think about it, I'm sure I've tried it before, but the game isn't supported by my version of RMXP. It was probably for an older version.

Thats an easy problem to fix. happens all the time.

 

Open your Game.rxproj in notepad and change the rpgmaker version with the version you currently have.

Then open Game.ini in notepad and change the RPT with the version you have.

Viola, it works.

 

 

-I really can't figure out the variable system; something's wrong with the way the variables act, because apparently I can shoot 2 rounds at the event and before I even manage to get off a third, he collapses with the text that appears when the conditional branch for the death variable is equal to 4. I don't know how it gets from 2 to 4 like that.

This might actually be a wait time problem, because the buttons actually registers about 10-15 "pushes per second" without any breaks. What you need to do is set a wait 05 or something at the end of the shoot process so that the button trigger doesn't go into overdrive. it also means the player can only shoot at a certain speed (how ever fast or slow you set the wait time).

 

 

-I can't figure out how to make my player have to face the event to actually shoot him (like, you can't be looking away from him and still be in the line of fire and be able to still actually shoot him)

this is more complicated. what you need to do is in your positioning setting set a few conditional branches

 

This should be after you know the player is in line.

If player X position < Enemy X position

 If player Facing Right = Hit

  else = no hit

If Player X position > Enemy X position

 If player Facing Left = Hit

  else = no hit

If player Y position < Enemy Y position

 If player Facing Down = Hit

  else = no hit

If player Y position > Enemy Y

 If player Facing Up = Hit

  else = no hit

 

This isn't tested but it's something like that. basically it looks to find which side the enemy is on and if you're not facing that direction it fails.

 

this should work, but you need to set up a whole array of variables and conditions for each character. It's a big mess working this way with variables and common events for such a complicated script. I suggest using Mr. Mo's ABS if you can.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...