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.

How to event this minigame...

The text in green is the main thing I need answered  :tongue:

Hey guys  :smile:
I have a question on how to event something, so hopefully the answer will be fairly simple.
I have minigame where you are in a caravan. but a gang of thieves are trying to chase you. So, if the thieves get within about 3 tiles behind the caravan, you can shoot them with arrows. (Otherwise the arrow will shoot, but not hit anything). I have an arrow characterset, which will shoot when you press a certain button.  But if they (the thieves) get too close (Being 1 tile next to the caravan), they can start to attack the caravan...

You can dash for a short amout of time to get the thieves off your back. If they get on the sides of the caravan, thats where they can attack. So at that time you would use dash to keep them behind you so you can shoot them with arrows.

The caravan moves through a map as the thieves follow, the movement is automatic, all you can do really is shoot the thieves.
I don't know how to make this all work. I have some ideas..and most of it I know how to do.

I just need to know, how to check when the arrow hits a thief, when a thief is within 3 spaces behind the caravan, and how to check if the thieves are right by the caravan so they can attack it.
If you need more info, just ask

Any ideas?  :smile:

Sorry if anything is unclear
 
You have to make 2 variables that check the Enemy's Map X and Map Y. Make an event that is a parallel process and inside it make a C-branch(s) that checks if the Map X/y is 3 tiles away. If true. make it where the arrow shoots and hurts them. You can make their HP with a variable aswell. So when you shoot and hurt them, -1 from the HP variable.

Make another C-Branch that checks the Map X/Y so if it is 1 tile away, Make the Caravan attackable. You can also keep the Caravan's HP with a variable. I can make this more "In-depth" later, if you don't get what i am saying
 
Ah. Yes. I understand.
But, the caravan is on the move through the map. So I don't know how to check if the enemy is within 3 tiles behind the caravan.
I know how to check for certain coords, but the caravan is always moving on an automatic "track".
Once I find that out, I can do the rest of this on my own.
 
Okay, I think I've got an idea for you.  First off, you have the caravan moving using objects, that appear on the map and are in a set route, obviously... so where you've set your events, to make your caravan move, make invisible events, first three spaces behind the caravan, and then two on each side, and set the move routes exactly the same so they move at the same time as the caravan, so they're always right next to it, and three spaces behind.  Check?

Next, set a new event page so after they/the caravan starts moving, when the thieves hit those events they trigger a common event, or whatever event you want to happen, to make you lose the mini game, or whatever you want it to do.

Next, the arrows.  This one's pretty simple, in a way.  Make the same type of event touch trigger so it adds a variable every time the arrows hit.  However; the hard part here is that I have only choppy ideas on how to get the thieves to slow down when you hit them. (I'm assuming you want them to slow down)

-Actually, scratch that.  Set move route; set the speed slower, set a wait time, then speed them back up.  Hopefully this is what you're looking for.  It's all logic once you put it together.  Trial and error will probably help you out a lot also. 

Good luck!
 
Oh, and like Chainsaw said;  you can use variables for hp also.  And if you can only shoot them from three tiles away then you'll have to use that invisible event you made flip a switch that lets you shoot an arrow.  Then perhaps make another invisible event right behind that one that turns the switch off.  It seems that would work... but I'm sure I'm missing something that makes it more complicated. lol
 
Thanks for the extra help mikee  :smile:
After a long time of messing around with what you guys said, I finally have it working  :lol: Took me about an hour to complete the whole thing. It works pretty closely to how I wanted it too.
I'm proud of how it works, so that's good.

If I have any problems, I'll let you all know :]

Here's how it looks:
http://i203.photobucket.com/albums/aa259/Sketchizt/Minigameex.png[/img]

Red squares are where you are able to shoot the thieves, and blue squares are where the thief is able to attack.
 
Awesome!  It looks great, Zammy!  I can't wait to play it.  lol I think you should do a demo for the mini-game. XD  You did make the events colored on purpose though, right?  It seems that way, because of your opacity, but I just like to make sure that people know they can be invisible.  : )

Again, nice job.  It looks like fun!
 

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