| 11-16-2003, 09:34 PM | #1 |
Is there a way to make any unit die if it enters a region during 1.5 seconds after the trigger has been activated? E.G. A special effect happens on a region and a footman enters the region during the special effect, the footman dies. The trigger then stops when the special effect ends. *Just need to know how to make the "duration" action in the trigger editor |
| 11-16-2003, 09:43 PM | #2 |
Just turn the trigger off when you want it to stop working - so action - trigger - turn on my trigger action - Wait (however long I want) action - trigger - turn off my trigger |
| 11-16-2003, 09:54 PM | #3 |
Not exactly what i meant. For the action part of a trigger, is there a way to say during 1.5 seconds. If there is not a way for wc3 editors preloaded "TRIGGER->Action", is there a way for custom text. Custom Text meaning.... E.G. call TriggerSleepAction( 0.25 ) |
| 11-16-2003, 10:17 PM | #4 |
I think this is what you want... Code:
During the special effect trigger add the action:
Turn on (enterdeath)
wait (how ever long your special effect lasts)
Turn off (enterdeath)
enterdeath
events
Unit enters region (specialeffects)
conditions
actions
Wait 1.5 seconds
if/then/else multiple fuctions
conditions
unit(entering unit) is in region (specialeffects)
then
kill unit(entering unit)
else
do nothingEDIT: After re-reading the thread, I realised this is purhaps this is not what your looking for.... Maybe this? Code:
During the special effect trigger add the action: Turn on (enterdeath) wait (how ever long your special effect lasts) Turn off (enterdeath) enterdeath events every .5 seconds condtions actions pick every unit in region (specialeffects) and do actions Kill(picked unit) To be of more detailed assistance your gonna have to explain what triggers the special effect so that perhaps you may get the exact answer your looking for.. |
| 11-16-2003, 11:03 PM | #5 |
Umm this is one of my triggers, function Trig_Vertical_1_Conditions takes nothing returns boolean if ( not ( GetUnitTypeId(GetConstructedStructure()) == 'h000' ) ) then return false endif if ( not ( RectContainsLoc(gg_rct_Verticle_1, GetUnitLoc(GetConstructedStructure())) == true ) ) then return false endif return true endfunction function Trig_Vertical_1_Func002001 takes nothing returns boolean return ( IsUnitAliveBJ(GetConstructedStructure()) == true ) endfunction function Trig_Vertical_1_Func013001002 takes nothing returns boolean return ( GetUnitTypeId(GetFilterUnit()) != 'n000' ) endfunction function Trig_Vertical_1_Func013002 takes nothing returns nothing call KillUnit( GetEnumUnit() ) endfunction function Trig_Vertical_1_Func014001002 takes nothing returns boolean return ( GetUnitTypeId(GetFilterUnit()) != 'n000' ) endfunction function Trig_Vertical_1_Func014002 takes nothing returns nothing call KillUnit( GetEnumUnit() ) endfunction function Trig_Vertical_1_Actions takes nothing returns nothing call TriggerSleepAction( 2 ) if ( Trig_Vertical_1_Func002001() ) then call DoNothing( ) else return endif call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_A), "Abilities\\Spells\\Other\\Awaken\\Awaken.mdl" ) call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_B), "Abilities\\Spells\\Other\\Awaken\\Awaken.mdl" ) call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_C), "Abilities\\Spells\\Other\\Awaken\\Awaken.mdl" ) call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_D), "Abilities\\Spells\\Other\\Awaken\\Awaken.mdl" ) call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_E), "Abilities\\Spells\\Other\\Awaken\\Awaken.mdl" ) call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_F), "Abilities\\Spells\\Other\\Awaken\\Awaken.mdl" ) call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_G), "Abilities\\Spells\\Other\\Awaken\\Awaken.mdl" ) call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_H), "Abilities\\Spells\\Other\\Awaken\\Awaken.mdl" ) call AddSpecialEffectLocBJ( GetRectCenter(gg_rct_I), "Abilities\\Spells\\Other\\Awaken\\Awaken.mdl" ) call ForGroupBJ( GetUnitsInRectMatching(gg_rct_Region_082, Condition(function Trig_Vertical_1_Func013001002)), function Trig_Vertical_1_Func013002 ) call ForGroupBJ( GetUnitsInRectMatching(gg_rct_Verticle_1, Condition(function Trig_Vertical_1_Func014001002)), function Trig_Vertical_1_Func014002 ) call TriggerSleepAction( 0.20 ) call RemoveUnit( GetConstructedStructure() ) endfunction //=========================================================================== function InitTrig_Vertical_1 takes nothing returns nothing set gg_trg_Vertical_1 = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Vertical_1, EVENT_PLAYER_UNIT_CONSTRUCT_FINISH ) call TriggerAddCondition( gg_trg_Vertical_1, Condition( function Trig_Vertical_1_Conditions ) ) call TriggerAddAction( gg_trg_Vertical_1, function Trig_Vertical_1_Actions ) endfunction At the end right before call RemoveUnit( GetConstructedStructure() ) endfunction i want to make the duration of killing the unit 1.5 seconds [about how long the special effect happens] Thnx Man, Sry for not being so specific... Do you know of any other editors with that duration function with out going into custom text? |
| 11-16-2003, 11:16 PM | #6 |
You could try a timer when the unit enters a regon and make anothor trigger that runs untill the timer expires. |
| 11-16-2003, 11:37 PM | #7 |
Oh wait, you mean you want to slow down or speed up the speed of a unit dying? If so it's Animation - Change Unit Animation Speed... but since all units have different death animation lengths, you're not going to be able to set animation speed to a given value and have it make all death animations last the same "duration..." |
| 11-16-2003, 11:55 PM | #8 |
Not to speed up, I just want any unit that enters the specific region to die instantly. During the special effects , and then cancels off after the duration of the special effect. The trigger is activated by constructing a building Construction of building = Bomb "Custom Building" |
| 11-17-2003, 01:02 AM | #9 |
Picture of Trigger I just want the unit to die when it touches or go over the special effect |
| 11-17-2003, 01:18 AM | #10 |
OK. You're going to need a trigger that goes like this: The Killing Trigger Event - unit enters region (your region) Condition - Action - Kill (entering unit) Now, in your trigger that places the special effect, also have it Move your region to the location of the special effect, and add the actions like suggested before: Trigger - turn on The Killing Trigger wait (however long you want to wait) Trigger - turn off The Killing Trigger Oh and it's not custom text... why, do you need custom text? |
| 11-17-2003, 02:01 AM | #11 |
So I just make another trigger right The Killing Trigger Event - Unit enters vertical1 Condition - none Action - Kill entering unit I'm confused about this part Move your region to the location of the special effect, Then Add to the Vertical 1 Trigger, Trigger - turn on The Killing Trigger wait 2 seconds Trigger - turn off The Killing Trigger Where would I add this, at the end of the special effects actions? Also would I have add the following action Trigger - turn on The Killing Trigger because I want the trigger to be continously |
