AM2R-Community-Developers / AM2R-Community-Updates

Source code for AM2R 1.5.2+, free of copyrighted assets and trademarks.
https://www.reddit.com/r/AM2R/
Other
137 stars 25 forks source link

Suggestion: proximity check for gamma electric attack #103

Open Jesright73 opened 2 years ago

Jesright73 commented 2 years ago

Gamma metroids aren't doing their part with energy conservation. They waste so many kilowatts spouting out sparks all willy nilly.

My proposition to combat this; set a proximity check on the state that tells the gamma to make sparkles. This will conserve energy, make the gammas less vulnerable in large rooms, and allow them to maintain speed for longer.

To achive this goal, replace lines 64-70 of gml_Object_oMGamma_Step_0 with this

            if (nextsp == 1)
            {
                if (distance_to_object(oCharacter) < 80 && room != rm_a4h09 && room != rm_a4h11)
                {
                    state = 7
                    spdelay = 180
                    statetime = 0
                    turndelay = 5
                }
                else if (room == rm_a4h09 || room == rm_a4h11)
                {
                    state = 7
                    spdelay = 180
                    statetime = 0
                    turndelay = 5
                }
            }

this code will not affect the two gammas in the sand-filled rooms of area 4, allowing them to continue being useful as landscapers