So im just trying to make a simple game. Which is a Tug of War game. Everything works but, when x==-10 or x== 10 it should say which side wins but it doesnt.
if x == -10 then
text = "red wins! Please wait"
love.timer.sleep(2)
x = 0
text = ("Keep Smashing")
end
here is the code. If anyone can tell me what i did wrong, and correct me that be nice. Also it change by increments of 1.
Help for a tug of war game.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Sir_Silver
- Party member
- Posts: 286
- Joined: Mon Aug 22, 2016 2:25 pm
- Contact:
Re: Help for a tug of war game.
I think you still need to upload your code.
Re: Help for a tug of war game.
Code: Select all
if x == -10 then
Code: Select all
if x <= -10 then
- zorg
- Party member
- Posts: 3468
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Help for a tug of war game.
also don't use love.timer.sleep like that; you're expecting graphics to magically pop up because of that, but in reality, that's not how the game loop works. keep a timer around, and change the text value and stuff after a set amount of time elapsed; use love.update and dt for that.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], slime and 7 guests