Hello. Im new to lua and love2d.
Things gets tricky when i need to play specific sequence of animation on key events.
function love.update(dt)
anim:update(dt)
world:update(dt)
if love.keyboard.isDown("d") then
bodies[1]:applyForce(800, 0)
anim:play() <---- i need to play specific frames and loop them. is it possible? if no, maybe somebody could recommend different way to play animation when character moves.
Thanks in advance!
AnAl Animation in side-scrolling game
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: AnAl Animation in side-scrolling game
Give your entity a state, and then play an animation depending on the state of your entity. So you could have a walking state, a standing state, a jumping state, etc. and then play the corresponding animation.
See my attached file for an example.
See my attached file for an example.
- Attachments
-
- walkanimation.love
- (345.49 KiB) Downloaded 266 times
Re: AnAl Animation in side-scrolling game
Guess I will need to make avatar OBEY too...
Thanks man! I thought forums are quite dead. Btw does somebody know whats going on with Love lately?
Thanks man! I thought forums are quite dead. Btw does somebody know whats going on with Love lately?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: AnAl Animation in side-scrolling game
A lot is going on. There have been some changes in the dev team, LÖVE 0.7.0 will probably be released before the end of next century, and the community is as active as ever.Deluxo wrote:Btw does somebody know whats going on with Love lately?
Help us help you: attach a .love.
Re: AnAl Animation in side-scrolling game
Well everything you said sounds very sarcastic... Can you confirm what you sir wrote up there?
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: AnAl Animation in side-scrolling game
I confirm that the community is active. I've poked it, it was active.
A bit more seriously (but not too much): It is possible to follow the development in quasi-realtime by going to its bitbucket page. You can even subscribe to its atom feed, if you are into that kind of thing.
It seems that development has slowed down a bit during last 2 months or so - I'm guessing due to exams and summer holidays.
You may notice that the 0.7.0 section has been in the changelog for a month already. In theory it should not take much longer to have a new version.
A bit more seriously (but not too much): It is possible to follow the development in quasi-realtime by going to its bitbucket page. You can even subscribe to its atom feed, if you are into that kind of thing.
It seems that development has slowed down a bit during last 2 months or so - I'm guessing due to exams and summer holidays.
You may notice that the 0.7.0 section has been in the changelog for a month already. In theory it should not take much longer to have a new version.
When I write def I mean function.
Re: AnAl Animation in side-scrolling game
Since it seems this topic has been resolved, I'm going to go a bit off-topic for a moment.
Are there any of us that don't go to school (whether K-12 or college)?
Are there any of us that don't go to school (whether K-12 or college)?
Good bye.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: AnAl Animation in side-scrolling game
What the hell? Don't answer that!
Re: AnAl Animation in side-scrolling game
Ahem, I'm not asking for ages, I'm just asking if anybody's actually gotten to the point in which they're past college.
If not, it would really explain a lot about the immaturity I sometimes find here.
If not, it would really explain a lot about the immaturity I sometimes find here.
Good bye.
Re: AnAl Animation in side-scrolling game
I graduated from college three years ago and I like making Love Admittedly, I'm not very experienced
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 6 guests