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.

Football minigame/Soccer Minigame help

Sero

Member

Well you see, I want to make a football game/ soccer game to add to a minigame packet I made. I already made the football game.

footballu.png
Just a few problems. I want the opponent to be able to score.
I want to know how to event the opposing team's scoring. Like if the frog goes between your trees, the Red team get a point.
And for the soccer thing. I havent started he soccer. But I need to know how I can make your player pass the ball to another player, then you switch characters. <-Optional
Or how to make your player kick the ball, the other team intercepts and kicks it into your goal, scores a point and you cry tears of sadness...... :cry: <- Seriously need
 
Well, it could be possible with a LOT of Conditional branches and Variables, but it won't be pretty....

The best thing you could do though, is to request a script for it.

As for this part....
Like if the frog goes between your trees, the Red team get a point.
Can be done with the same way as normal switches work, if thing A is on location B, then Team C gets a point. (Points could be done using variables, everytime a point is scored, just add 1 to the variable.)
 

Sero

Member

My football game took me about an hour+.
Oh yeah. I also want to know how to make the enemy go towards your goal, dodging you if you get in its way.
And the tutorial was helpful.
 
AIs are tricky things, and you'll need to design it very precisely, step by step.

I'm going to assume that this is a one-on-one game, maybe with goalkeepers. Anything else would be pretty insane.

You'd want the opponent's event to have several different "States," best handled by having several different pages with different conditions.

Let's say Page 1 is "Loose ball!" When nobody has the ball, the opponent moves towards the ball.

Page 2 is "They got the ball!" When the player has the ball, the opponent moves towards the player, or maybe towards their own goal. (Which one will really depend on how much of a mechanism you put in for tackling/stealing the ball/whatever.)

Page 3 is "I got the ball!" When the opponent has the ball, they move towards the player's goal. If they have to carry the ball to make a goal, then that can be the entire task.

Page 4 would be "I got the ball, but you're in my way!" When the opponent has the ball, but the player is too close or perhaps between them and the goal, they move towards the goal but away from the player.

Depending on the complexity of your rules and your AI, you might need other pages.

You'll also need a fairly complex tracking event running Parallel Process, which keeps track of where player, opponent, ball, goals, and any other players and goalies are relative to each other, so that it can switch any pages needed.

Don't have the time to throw this all together right now, but hopefully, that'll get you started.
 

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