HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Disabling unit alarm

01-03-2004, 02:45 AM#1
th15
In my map i use units with kaboom as missiles. That wy they can be intercepted and shot down. I also use a system that casts purge on missiles when they are launch so that it appears as if the missiles gradually speed up on launch instead of going full speed from start. The problem is, that triggers the "unit under attack" alarm. I've tried manually remove the unit's "Alarm" ability but it doesnt work. The unit - Disable alarm generation action says it only works on buildings. Does anyone know how to remove this alarm for this unit only?
01-03-2004, 03:26 PM#2
th15
Unfortunately purge no longer has a slow effect on firendly target. It merely dispells buffs if used on a friendly target.
01-03-2004, 04:35 PM#3
Kamahl
You could just change the spell. Make a new custom ability that's the same, but make it so the slow still affects them. Or, just copy slow and make it only able to target friendlies.
01-03-2004, 06:32 PM#4
th15
Im not quite sure you understand what i'm saying here. Purge on friendly = NO slow. Got that? This is TFT, not RoC.
01-03-2004, 06:48 PM#5
Ligature
I think he's suggesting you use a different spell than purge, like "slow" and change it to allow casting it on friendlies.
01-03-2004, 07:24 PM#6
Bulletcatcher
Here's my workaround for purging allies.
The side effects are that the targetted unit loses any orders, is unselected for a very short moment and that if two purges are cast within 0.05 seconds of each other, one unit will be stuck as neutral hostile and paused. That is, however, extremely unlikely.
The last one could probably be avoided by using a local variable, if you know how to do that.
Also, if the unit is selected by someone other than the player casting purge, that person has the unit unselected.

Nothing major. You can probably reword the trigger to avoid most of those.

The reason for the 'purgeTmpUnit' variable being used instead of 'Target unit of ability being cast' after the wait, is because I hear there's a bug that clears 'Target unit of ability being cast' after a wait.

And here's the trigger:
Code:
PurgeAllyWorkaround
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Purge (Allied)
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Owner of (Target unit of ability being cast)) is in (All allies of (Owner of (Casting unit)))) Equal to True
            Then - Actions
                Set purgePlayer = (Owner of (Target unit of ability being cast))
                If (((Target unit of ability being cast) is selected by purgePlayer) Equal to True) then do (Set purgeSelected = True) else do (Set purgeSelected = False)
                Unit - Pause (Target unit of ability being cast)
                Unit - Change ownership of (Target unit of ability being cast) to Neutral Hostile and Retain color
                Set purgeTmpUnit = (Target unit of ability being cast)
                Wait 0.05 seconds
                Unit - Change ownership of purgeTmpUnit to purgePlayer and Retain color
                If (purgeSelected Equal to True) then do (Selection - Add purgeTmpUnit to selection for purgePlayer) else do (Do nothing)
                Unit - Unpause purgeTmpUnit
            Else - Actions
01-03-2004, 07:28 PM#7
Kywrath
If you want to get rid of that alarm entirely (not just for those units, but all together), there is a section in the "Game Constants" window for The minimum distance that it will alarm at. Just crank that up and it should make it so that you are never alarmed of a unit being attacked.
01-04-2004, 04:30 AM#8
th15
Oh i see. Another spell like slow for example wouldnt work because i need the acceleration to be gradual and to my knowledge purge is the only spell with that effect.

As for temporarily switching the missile's ownership to another player, thats feasible but i hope it isnt buggy.

I guess getting rid of alarms entirely is the easy way out. Ah well, this is the kinda headache im begging for by having triggered weapons.
01-04-2004, 04:42 AM#9
l]arkOne
Set unit movement speed...