Problems with collisions
-
@landein207 the demo is pending but should be available soon.
-
Ok thanks for helping me understanding how collisions work here :)
-
That has been approved
-
Lightning ⚡ fast :)
-
@waldron Express delivery!
-
Ok i just saw the code i understand how to make collisions with setplayerspeed now i think i will try see in another games with setspritelocation controls to see how to make collisions because im trying to make a game like undertale battle fan made that i think would be hard to play with a always moving character but thanks a lot now i know how to work with collidesprites + setspritespeed thank you all for helping me :)
-
@landein207 that's fine that demo was just to demonstrate collision for you. I can update the demo tomorrow to stop the player when not pressing the button and also add in another way to move the player without using the setspritespeed
-
Ok @waldron i was testing with the demo that you gave to me and i was trying to do the controls like this
loop
clear()
plr.show_collision_shape = true
wall.show_collision_shape = true
c = controls(0)
oldc = controls(0)If c.lx == 0 and c.ly == 0 then
Setspritespeed(plr,0,0)
endifIf c.lx > 0 then
Setspritespeed(plr,100,0)
endif
If c.lx < 0 then
Setspritespeed(plr,-100,0)
endif
If c.ly > 0 then
Setspritespeed(plr,0,-100)
endif
If c.ly < 0 then
Setspritespeed(plr,0,100)
endif
If c.lx > 0 and c.ly < 0 then
Setspritespeed(plr,100,100)
endif
If c.lx < 0 and c.ly < 0 then
Setspritespeed(plr,-100,100)
endif
If c.lx < 0 and c.ly > 0 then
Setspritespeed(plr,-100,-100)
endif
If c.lx > 0 and c.ly > 0 then
Setspritespeed(plr,100,-100)
endif
//the rest of the codebut idk how this happens but looks that the diagonal one override the another one how does that work with out the diagonals override the rest of the controls?
-
@landein207 it's a different ball game when using the stick as it's very sensitive. there's also many ways to go about movement. Have a look at some of the sample programs in fuze and see how they ✋ handle movement.il update the demo tomorrow with stick controls
-
I think you want something like:
setSpriteSpeed (plr,100*c.lx,-100*c.ly)
Though 100 seems fast, but is in line with what you had.