Search found 28 matches
- Tue Jun 19, 2018 9:08 pm
- Forum: Support and Development
- Topic: [SOLVED]HUMP Gamestate Issue: Passing Parameters Into New State
- Replies: 6
- Views: 5432
Re: HUMP Gamestate Issue: Passing Parameters Into New State
I think you can solve it this way: let's say you call Gamestate.push(StateTwo, "ATTACK", 11, 18), then you should define StateTwo:enter() as such: function StateTwo:enter(prev, attack, defense, speed) local atk = attack local dfs = defense local spd = speed --and so on end or this one migh...
- Tue Jun 19, 2018 7:26 am
- Forum: Support and Development
- Topic: [SOLVED] sync sprites with collision boxes using bump
- Replies: 1
- Views: 1482
Re: sync sprites with collision boxes using bump
Ok it was stupid i should have offset the sprite instead of the collision box in the first place
- Tue Jun 19, 2018 6:51 am
- Forum: Support and Development
- Topic: [SOLVED] sync sprites with collision boxes using bump
- Replies: 1
- Views: 1482
[SOLVED] sync sprites with collision boxes using bump
Hi guys, i'm having some problems with syncing collision boxes with sprites using bump: my approach last time (i didn't used any library for the physics though) was to give each game object an offx and offy fields so that they had an x and y field for where start to draw and a collision box = {self....
- Tue Apr 17, 2018 11:30 am
- Forum: Support and Development
- Topic: Binding two objects
- Replies: 3
- Views: 3887
Re: Make two objects "work together"
Thank you! Your explanation was crystal clear! Just another question: if i want to place the interacting objects using tiled and i have more than one pair in the same map how could i bind them correctly? (the only thing i can think of is give them a name like "object door 1" and using stri...
- Mon Apr 16, 2018 9:24 pm
- Forum: Support and Development
- Topic: Binding two objects
- Replies: 3
- Views: 3887
Binding two objects
I'm sorry that i did't found a better way to explain this:
i'd like to have some objects work "in tandem" such as a switch that when triggered opens a particular gate or two tiles that teleport the player from one to another, do you have any suggestion on how i can accomplish this?
i'd like to have some objects work "in tandem" such as a switch that when triggered opens a particular gate or two tiles that teleport the player from one to another, do you have any suggestion on how i can accomplish this?
- Thu Apr 05, 2018 4:06 pm
- Forum: Support and Development
- Topic: Difference between love.keypressed and love.keyreleased?
- Replies: 1
- Views: 1769
Difference between love.keypressed and love.keyreleased?
Hi everyone! the title it's self explanatory, this one may be trivial but i'm asking as i've found a weird behaviour in my game: basicly i wanted to use the approach of cs-50 introduction to game development in order to use a single love.keypressed conveniently for all the gamestates: function love....
- Sun Feb 25, 2018 5:31 pm
- Forum: Support and Development
- Topic: Transition between rooms / levels
- Replies: 3
- Views: 3434
Re: Transition between rooms / levels
Ok, i managed to make a transition between the level and the gameover state this way: -- IN GAME.UPDATE(DT) if not player.isAlive then game.wait = true -- this flag prevent player() and enemies from update game.timer = game.timer + 200 * dt if game.timer > 255 then game.timer = 0 game.reset() map_ma...
- Sun Feb 25, 2018 3:57 pm
- Forum: Support and Development
- Topic: Transition between rooms / levels
- Replies: 3
- Views: 3434
Transition between rooms / levels
Hi everyone! Currently i'm making a space shooter and i wanted to make a small transition between the end of a level and the next one [something like screen fading, black screen for a couple seconds (i would like to load the map here) and then show the new level (i would also like to put something l...
- Sun Feb 25, 2018 3:45 pm
- Forum: Support and Development
- Topic: Gamestates and "..."
- Replies: 1
- Views: 1408
Gamestates and "..."
*** EDIT: Ok, i'm an idiot; i used for k,v in ipairs(table) but the loaded table had only string keys and seems like ipairs ignores them... :cry: Hi everyone! Currently i'm trying to make a space shooter but i got stuck; I have a "game" that manages the main game and i wanted the game.ente...
- Tue Feb 20, 2018 8:26 pm
- Forum: Support and Development
- Topic: Camera and pause problem
- Replies: 4
- Views: 2666
Re: Camera and pause problem
Yes! This works just fine, i have to check love.graphics.origin in the wiki