Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class EnemyMapMarker : MapMarker {
- default {
- Scale 0.3;
- }
- transient CVar scaleCVar;
- transient bool gotScaleCVar;
- override void Tick () {
- if (!gotScaleCVar) {
- scaleCVar = CVar.FindCVar ('marker_scale');
- gotScaleCVar = true;
- }
- if (scaleCVar)
- scale.X = scale.Y = scaleCVar.GetFloat ();
- // Remove the actor if it has no target
- if (!target) {
- Destroy ();
- return;
- } else if (target.health < 1) {
- sprite = GetSpriteIndex ('TNT1');
- frame = 0; // Frame "A"
- return;
- } else {
- sprite = GetSpriteIndex ('MARE');
- frame = 0; // Frame "A"
- }
- SetOrigin (target.pos, true);
- Prev = target.Prev;
- }
- States {
- Spawn:
- MARE A -1;
- stop;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement