RunFaps
shaunjs
shaunjs patreon

Week 5 - Shaun forgot to run a poll

🕑 Added 2018-01-29 12:29:32 +0000 UTC

Comments

This will be very useful i am currently making a game and i have some rather large rooms with enemies scattered and while initally i was getting confused how to use this i now realise i can have each wave on array which counts up by 1 pending on player location and will only be reset back to 0 if the player restarts the room. Least thats the theory.

It's unlikely as I've got a lot of more "Core" concepts to go over in that series. To make a grenade you'd do more or less the same thing you do with the projectile but simply move it differently and destroy it differently. For its "Physics" you could replicate your player's collision code, give the grenade some base hsp/vsp based on the direction of the player, do some maths to invert its direction when it collides if you want it to bounce, then decide how many bounces until it explodes. Or explode it on a timer with an alarm. Or explode it on any collision to be simple. Either way, destroy the instance, then in the destroy event create some sort of oExplosion with some kind of blast sprite, then have that affect other things with collision events and so on, and in the animation end event, destroy the explosion. This is how the bombs work in my GM48 game, pokeypoke

Could you add a grenade tutorial to your platformer series? I keep failing at making a throwable grenade. Thanks!


More Creators