Summoning Golems, Depending on Casted time Trigger

soulmaka

New Member
Reaction score
2
ok, so... how do i create a trigger that, when the Hero, Cast this ability.. if the casted time is

2-6 Seconds= creates a weak Golem
7-14 Seconds= Crates a normal golem
15-19 Seconds= Creates a Super Golem
23 seconds above= Creates a Powerful Granite Golem

i rhink rhis might need 2 separate triggers right? xD
 

Bogrim

y hello thar
Reaction score
154
Base the ability on Channel. Make the ability channel a spell for however long you wish the maximum duration to be.

When the unit starts channeling the ability, run a timer. When the unit stops channeling the ability, use the timer's Elapsed Time real value to determine how long the unit has been channeling the spell. Use If Then Else actions to create your Golem. For example:

Trigger:
  • Golem Timer Begin
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Countdown Timer - Start timer_Golem as a One-shot timer that will expire in 25.00 seconds
Trigger:
  • Golem Timer End
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Set Temp_Point = (Position of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Elapsed time for timer_Golem) Greater than or equal to 2.00
          • (Elapsed time for timer_Golem) Less than or equal to 6.00
        • Then - Actions
          • Unit - Create 1 Weak Golem for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Elapsed time for timer_Golem) Greater than 6.00
          • (Elapsed time for timer_Golem) Less than or equal to 14.00
        • Then - Actions
          • Unit - Create 1 Normal Golem for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        • Else - Actions
      • ...

Alternatively you could create a unit type array and set the array indexes in the map initialization to the corresponding golem types depending on the amount of time, converting the real into an integer as index. (e.g. "GolemType[(Integer(Elapsed time for timer_Golem))]")
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top