I am trying to make it so that when a certain weapon is equipted, the players current stats are boosted by the weapon's bonuses. T the moment I have the bonus variables stored in obj_weapon and I want my obj_player to have their stats boosted while the weapon is equipted. The problem is when I use my code it constantly adds the bonus every time the step event repeats. I want it just to be a one off occurance in the step event. Here is my current code:
Step event:
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////WEAPONS/////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
if obj_weapon.cwep = spr_bd
{
maxhit += bdmhbonus//0.05
splashrate += bdsrbonus//2.5
}
if obj_weapon.cwep = spr_bs
{
maxhit += bsmhbonus//0.1
splashrate += bdsrbonus//3
}











