Makkeonmies
Member
So. This might have the easiest solution to it that i just cant figure out, but: i have this TDS game where an enemy object has two stances, patrolling and attacking. Patrolling means it gets a random direction and speed, and starts going around the level. (in Step Event) Then when the time comes, or when it sees the player, it attacks, meaning it gets the mp_potential_step -code in the Step event, and the patrolling-variable turns to zero. However, it still somehow counts the patrolling speed ON TOP of the attacking speed, resulting in the enemy object rushing at the player crazy fast. I just cant find out how to prevent it from adding the patrolling speed to the attack speed, i mean, the patrolling variable is turned to 0 when it attacks, so it shouldn't even take the patrolling speed into consideration anymore?
I tried moving the patrolling event to Step End, but that didnt help. Would moving it to Step Begin do the trick, didn't get to try it out yet...
So yeah, i'd just want to know how to make the enemy object not add the attack speed on top of the 'patrol' speed when it finally attacks, just switch to the attack speed.
Thanks beforehand. Hope its not too complex.
I tried moving the patrolling event to Step End, but that didnt help. Would moving it to Step Begin do the trick, didn't get to try it out yet...
So yeah, i'd just want to know how to make the enemy object not add the attack speed on top of the 'patrol' speed when it finally attacks, just switch to the attack speed.
Thanks beforehand. Hope its not too complex.