Platform Builder Forums
Main => General Discussion => Topic started by: Antikore on April 09, 2019, 09:20:43 AM
-
You have heard about formulas in videogames?
A good example of this is a Damage Formula. It's the step between someone damages you and the final damage you get is selected. In Platform Builder, mostly all do 1 damage, but here you can refine it.
The most basic damage formula is:
final_damage = (attacker_damage - victim_defense)
You can implement this in Platform Builder in a damage player event in an enemy.
health + 1
game var final_damage = (Add here your enemy damage)
game var final_damage - [game var player_defense]
if game var final_damage < 0
{
game var final_damage = 0
}
health - [game var final_damage]
This is the same formula applied to Platform Builder.
I will extend this in the future. Thanks for reading.