• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - GML Visual Game breaks when I change speed with collision

I am making a shooter game where the enemies move down toward the player until hit or they go off screen. I have some slow enemies that take more hits and I want the normal fast enemies to slow down when they contact them so that they don't go past the slower enemies.

No matter how I seem to do this, when an enemy touches a slow enemy both the faster enemy and the slow enemy stop moving altogether. This makes no sense because there is no code anywhere ever telling the slow enemies to stop moving. Plus I can no longer die by making contact with the enemies when I stop moving. Lastly, the spawning slows down until it stops which may just be enemies getting stuck before becoming visible.

All that to say what is going on? My game barely has any code and already breaks at something this simple! It is very frustrating and was wondering how I can go about getting it fixed. Thanks!
 

mimusic

Member
Do you have the 'solid' property turned on for any of the objects representing slow or fast enemies? GM's built in concept of a 'solid' object tends to lead to a lot of unintended... stickiness (for lack of a better term), in my own experience.

Beyond this guess, there's little to go off of without seeing your code. The issues you're having could theoretically be caused by any number of potential issues, but it'll be easier to diagnose if we can see your code.
 
Top