2d skateboard game
-
@Dave you'l regret saying that.. haha
i'm getting used to adding my enemies in game now but how can i change there death state from
collision/velocity (jumping into them) to a button attack (c.x) from my player?
if i can master that i can then add animation to my level and crushing blocks and spikes coming out of walls ect but give them a state where they kill me
-
I think you could use multiple death states, each having their own specific spritesheet to draw from, and requisite conditions to trigger them. Something like:
(Of course, this is pseudo-code)
if collide with enemy and playerState != attack then enemyState = death1 endif if collide with enemy and playerState == attack then enemyState = death2 endif if enemyPosition overlaps with kill box then enemyState = death3 endif
There is probably a much more lovely way of doing this, but this is the route I would personally go down.
Then, you'll have specific conditions for each of those death states:
if enemyState == death1 and collides with player then // do specific things endif
-
@Dave wonderful stuff cheers
-
I very nearly gave up, with all these ideas floating around my head trying to implement them all just caused confusion.
So I stripped it back down to what I think I know and fixed all the confusion to something I can build on.
With huge magnitudes of greatfullness for the fuze team and users.Thankyou!!!
-
@waldron Awesome work man! This is really coming along!
-
any idea how i can fix my points for tricks, at the moment iv assigned score to a button press (trick) but obviously the user can just sit there and rack up a huge score.
I thought i cracked it last night by putting in movement speed for the opposite direction while pressing the button which actually gave it a great effect of grinding to a halt but then starts moving in the other direction and breaks the effect.
so is there a way i can create a dead zone so i can keep this set-up but have the movement and score to stop once my character is not moving ? i can provide a video later to help explainactually just figured out the movement thing by changing the direction of movement to y. axis.down so now i just need
the score fixing
-
@waldron I don't know if I'm following completely, but one thing I've been doing when I need a "cool down" is to have a global integer, then in my gameplay code I subtract it by one, and say "is it zero yet? if so, let them do action XYZ again".
-
@Spacemario i'l upload a video later altho a cool down does sound like a possible fix just don't know how i would code it,
my code from memory atm is kinda likeif c.y state = trick then playerY movespeed -= // gives me the drag effect (slowdown) playercoin += 1 // gives me the score .........so on so on
-
@waldron said in 2d skateboard game:
@Spacemario i'l upload a video later altho a cool down does sound like a possible fix just don't know how i would code it,
my code from memory atm is kinda likeif c.y state = trick then playerY movespeed -= // gives me the drag effect (slowdown) playercoin += 1 // gives me the score .........so on so on
Tony hawks gets round this issue with balance bars
-