Last active
July 31, 2019 18:40
-
-
Save caligari87/b335c5f84337c2f88e5cc0d4e328e590 to your computer and use it in GitHub Desktop.
Oops All Marines: Small mutator for Hideous Destructor that makes all monsters into enemy marines.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gameinfo { | |
AddEventHandlers = "OopsAllMarines" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version "4.1" | |
class OopsAllMarines : EventHandler { | |
override void WorldThingSpawned(worldevent e) { | |
if(!e.thing) { return; } | |
if(!(e.thing is 'HDMobBase')) { return; } | |
if(e.thing is 'HDMarine') { return; } | |
bool friend = e.thing.bFRIENDLY; | |
vector3 thingpos = e.thing.pos; | |
double thingangle = e.thing.angle; | |
e.thing.destroy(); | |
actor newmarine = Actor.spawn("Tango", thingpos); | |
newmarine.angle = thingangle; | |
newmarine.bFRIENDLY = friend; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment