package ObjectTarget import SetupObject import ChannelAbilityPreset public constant OBJECT_TARGET_ID = 'wisp' public class ObjectTarget extends SetupObject construct(vec2 pos, player owner) super(createUnit(owner, OBJECT_TARGET_ID, pos, angle(0)), createUnit(owner, OBJECT_TARGET_ID, pos, angle(0)), 0.) override function serialize() returns Json let json = super.serialize() json ..addProperty(new Property(KEY_TYPE, OBJ_TARGET_INDEX.toString())) return json override function setEnabled(boolean b) @objectgen function genTarget() new UnitDefinition(OBJECT_TARGET_ID, 'ushd') ..setAttacksEnabled(0) ..setTargetedAs("air") ..setAnimationBlendTimeseconds(0) ..setAnimationCastBackswing(0) ..setAnimationCastPoint(0) ..setHitPointsMaximumBase(999999999) ..setHitPointsRegenerationRate(9999999) ..setIconGameInterface("ReplaceableTextures\\CommandButtons\\BTNWisp.blp") ..setModelFile("units\\nightelf\\Wisp\\Wisp.mdl") ..setSelectionScale(0.8) ..setShadowImageUnit("") ..setTintingColorRed(0) ..setTintingColorGreen(0) ..setUnitSoundSet("") ..setCollisionSize(0) ..setSpeedBase(180) ..setMovementHeight(0) ..setTurnRate(999) ..setMovementType(MovementType.Fly) ..setNormalAbilities(commaList('A01H', 'A01E', REMOVE_OBJECT_ID, GHOST_VIS_ID, MAKE_UNIT_INVISIBLE_ID)) ..setHotkey("Y") ..setName("|cff0894E6Object Target") ..setTooltipBasic("|cffFFCC00Train |cff0894E6Teleporter Target [Y]") ..setTooltipExtended("Spawns a Objecttarget at|cffFFCC00 Rallypoint|r.|nSet the Rallypoint of a " + "Teleporter to this unit to get a moving Target.|n|n|cff5ABD4ADoes not kill Escapers") ..setUpgradesUsed("") ..setHitPointsMaximumBase(100000000) ..setSightRadiusDay(0) ..setSightRadiusNight(0) ..setFoodCost(0) ..setHideMinimapDisplay(true)