Search found 227 matches

by iPoisonxL
Tue May 07, 2013 11:14 am
Forum: Support and Development
Topic: Player collision (with other player)???
Replies: 8
Views: 2995

Re: Player collision (with other player)???

I believe it should be like this (untested) death.check=function() for _,enemy in ipairs(enemy) do for _,player in ipairs(player) do if enemy.x+enemy.w>player.x and enemy.x<player.x+player.w and enemy.y+enemy.h>player.y and enemy.y<player.y+player.h then death.state=true end end end end Holy crap, ...
by iPoisonxL
Tue May 07, 2013 10:17 am
Forum: Support and Development
Topic: Player collision (with other player)???
Replies: 8
Views: 2995

Player collision (with other player)???

I'm making a basic game to amuse my friends. I haven't called it anything yet, but it's basically a square chasing another square. The red square is AI, and the white square is player-controlled. I've got the collision all figured out on that, and it works perfectly. I decided to make a 2 player ver...
by iPoisonxL
Sat Apr 27, 2013 7:43 pm
Forum: Libraries and Tools
Topic: Text Editor
Replies: 12
Views: 6566

Re: Text Editor

ArunHaridas wrote:I got a error message when run it
cannot create canvas : Not supported by your open gl implementation

Help....
use the sanscanvas version.

(bug)
The case isn't aligned with the spaces, the more spaces you make the further the flashing square is from the letters.
by iPoisonxL
Fri Mar 29, 2013 1:20 am
Forum: Libraries and Tools
Topic: Text Editor
Replies: 12
Views: 6566

Re: Text Editor

Maybe you could add a simple HTML syntax highlighting? You know, highlight whatever is between <> brackets in blue or something.
That'd be pretty cool, IMO.
by iPoisonxL
Thu Mar 21, 2013 11:12 am
Forum: Support and Development
Topic: [solved] Making my own animations
Replies: 13
Views: 7137

Re: [PLEASE HELP] Making my own animations

Thanks to you guys' help, I'm quickly advancing in the making of this simple but repetitive game!
You can only grab the zombie when he's close to you, and he disappears after you kill him. He also goes a bit slower when he's overlapping you!
zombie.love
(11.59 KiB) Downloaded 139 times
by iPoisonxL
Wed Mar 20, 2013 8:05 pm
Forum: Support and Development
Topic: [solved] Making my own animations
Replies: 13
Views: 7137

Re: [PLEASE HELP] Making my own animations

In char.lua, change: if (pnum>6) then pnum=1 zpressed=false end to: if (pnum>=6) then pnum=1 zpressed=false end The problem is: You stop the animation when pnum is greater than 6, which means it's 7. But since your image gets assigned in three lines above that, you're actually using char.img = asia...
by iPoisonxL
Mon Mar 18, 2013 7:29 pm
Forum: Support and Development
Topic: [solved] Making my own animations
Replies: 13
Views: 7137

Re: [PLEASE HELP] Making my own animations

Oh, in that case you will want spectralcanine's suggestion, with one minor change: Change if (pnum>6) then pnum=0 end to if (pnum>6) then pnum=0 zpressed = false end Then it will stop at the end of the animation. Oh, I didn't even think of that. Thanks! you know, a while ago, I started to realize h...
by iPoisonxL
Sun Mar 17, 2013 1:03 am
Forum: Support and Development
Topic: [solved] Making my own animations
Replies: 13
Views: 7137

Re: [PLEASE HELP] Making my own animations

So... what you actually want is that if the player presses 'z', the game selects the next frame in the animation? function char.next() pnum=pnum+1 char.img=asian[pnum] if pnum > 6 then pnum = 0 end end function love.keypressed(key) if key=='z' then char.next() end end No, I want the game to play th...
by iPoisonxL
Sat Mar 16, 2013 6:05 pm
Forum: Support and Development
Topic: [solved] Making my own animations
Replies: 13
Views: 7137

Re: [PLEASE HELP] Making my own animations

And what exactly is the desired result? If you want to continuously run it after pressing z, then simply set a boolean and check it. ... zpressed = false ... function love.update(dt) zombie.update(dt) if zpressed then char.smash(dt) end end ... function love.keypressed(key) if (key=='z') then zpres...
by iPoisonxL
Sat Mar 16, 2013 4:22 pm
Forum: Support and Development
Topic: [solved] Making my own animations
Replies: 13
Views: 7137

Re: [PLEASE HELP] Making my own animations

function love.update(dt) zombie.update(dt) function love.keypressed(key) if (key=='z') then char.smash(dt) end end end This does not do what you think it does. You want this: function love.update(dt) zombie.update(dt) if love.keyboard.isDown('z') then char.smash(dt) end end Like I mentioned in my p...