Game Development Reference
In-Depth Information
Don't forget to create a new button for shooting, if you are creating a mobile version
of the game. Shooting with touch controls is done the exact same way as walking and
jumping with touch buttons.
Melee weapons
If you want to create a game with melee weapons, I'll quickly take you through the
process of doing it. Melee weapons can be made the same way as shooting a bullet
in real. You can either have the blade or object as a separate actor positioned to the
actor, and when the player presses the attack button, have the player and the melee
weapon animate at the same time.
This way when the melee weapon collides with the enemy, it will be more accurate.
If you want to have the player draw the weapon in hand, simply animate the actor,
and detect if there is a collision.
This will be a little less accurate, as an enemy could run into the player when he is
animating and get hurt, so what you can do is have the player spawn an invisible
actor to detect the melee weapon collisions more accurately. I'll quickly go through
this with you.
 
Search WWH ::




Custom Search