haxball / haxball-issues

116 stars 43 forks source link

Finish Line #1736

Closed KalyterosPenisudo closed 2 years ago

KalyterosPenisudo commented 2 years ago

Hello, I want to set up a finish line in my bot, if the player crosses the line the bot stops the game. Can someone help me?

09x2019 commented 2 years ago

Hello, I want to set up a finish line in my bot, if the player crosses the line the bot stops the game. Can someone help me?

@MoisesAsafi Create a finish line on the map edit and check the x, y you defined on this line to see if the player crosses the line.

thenorthstar commented 2 years ago

Hello, I want to set up a finish line in my bot, if the player crosses the line the bot stops the game. Can someone help me?

@MoisesAsafi Hello friend. I have created a script for the basic cases your issue. It may be useful for you: https://github.com/thenorthstar/HaxBall-Example-Scripts/blob/main/Intermediate/FinishLine.js

Output: https://thehax.pl/forum/powtorki.php?nagranie=57bc38695e9477cc2ecb01b222a465a5