• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

trigger turn on not working

Status
Not open for further replies.
Level 7
Joined
Jun 15, 2010
Messages
218
  • questions
    • Events
    • Conditions
    • Actions
      • Hashtable - Save Handle Offireball loop <gen> as 1 of (Key (Triggering unit)) in Hashtable_loading_Bar
      • Trigger - Turn on (Load 1 of (Key (Picked unit)) in Hashtable_loading_Bar)
the triggering unit and picked unit are set right. Why isent this working?
 
Level 7
Joined
Jun 15, 2010
Messages
218
  • fireball
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Fireball
    • Actions
      • Set Fireball_Caster = (Triggering unit)
      • Set Fireball_Position_Caster = (Position of Fireball_Caster)
      • Set Fireball_Position_Target = (Target point of ability being cast)
      • -------- Hashtables for Loadingbar --------
      • Hashtable - Save Handle Offireball loop <gen> as 1 of (Key (Triggering unit)) in Hashtable_loading_Bar
      • Hashtable - Save Handle OfFireball_looping_group as 9 of (Key (Triggering unit)) in Hashtable_loading_Bar
      • Hashtable - Save Fireball_Remaining_Time[(Player number of (Owner of (Triggering unit)))] as 9 of (Key (Triggering unit)) in Hashtable_loading_Bar
      • Set Loading_bar_remainingTime_Base[(Player number of (Owner of Fireball_Caster))] = Fireball_Remaining_Time[(Player number of (Owner of Fireball_Caster))]
      • -------- Hashtables for Fireball Looping --------
      • Hashtable - Save Handle OfFireball_Position_Caster as 1 of (Key (Triggering unit)) in Fire_Ball_Hashtable
      • Hashtable - Save Handle OfFireball_Position_Target as 2 of (Key (Triggering unit)) in Fire_Ball_Hashtable
      • Hashtable - Save (Angle from Fireball_Position_Caster to Fireball_Position_Target) as 1 of (Key (Triggering unit)) in Fire_Ball_Hashtable
      • Unit - Create 1 Dummy for (Owner of Fireball_Caster) at Fireball_Position_Caster facing Default building facing degrees
      • Hashtable - Save Handle Of(Last created unit) as 9 of (Key (Triggering unit)) in Fire_Ball_Hashtable
      • -------- Standaart Loading Bar settings --------
      • Unit - Pause Fireball_Caster
      • Unit - Make Fireball_Caster face Fireball_Position_Target over 0.30 seconds
      • Animation - Play Fireball_Caster's spell channel animation
      • Set Loading_Bar_count = (Loading_Bar_count + 1)
      • Floating Text - Create floating text that reads <Empty String> above Fireball_Caster with Z offset 0.00, using font size 14.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Set Loading_bar_floatingText = (Last created floating text)
      • Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Triggering unit)) in Hashtable_loading_Bar
      • Floating Text - Show Loading_bar_floatingText for (All players matching ((Owner of Fireball_Caster) Equal to (Matching player)))
      • Floating Text - Change Loading_bar_floatingText: Disable permanence
      • Unit Group - Add Fireball_Caster to Loading_bar_Units
      • Trigger - Turn on loadingbar looping <gen>

  • loadingbar looping
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Loading_bar_Units and do (Actions)
        • Loop - Actions
          • Set Loading_bar_remainingTime = (Load 9 of (Key (Picked unit)) from Hashtable_loading_Bar)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Loading_bar_remainingTime Greater than 0.10
            • Then - Actions
              • Game - Display to (All players) the text: ja
              • Hashtable - Save (Loading_bar_remainingTime - 0.10) as 9 of (Key (Picked unit)) in Hashtable_loading_Bar
              • Set r0 = (100.00 / Loading_bar_remainingTime_Base[(Player number of (Owner of (Picked unit)))])
              • Set r1 = (r0 x Loading_bar_remainingTime)
              • Set i1 = (Integer((r1 / (100.00 / Chars))))
              • Set String = (Strings[0] + (((Substring(Strings[2], 1, i1)) + Strings[3]) + (Strings[1] + ((Substring(Strings[2], (i1 + 1), (Integer(Chars)))) + Strings[3]))))
              • Floating Text - Change text of (Load 1 of (Key (Picked unit)) in Hashtable_loading_BarIf the label is not found, this function returns NULL.) to String using font size 14.00
            • Else - Actions
              • Game - Display to (All players) the text: nee
              • -------- laatste gedeelte --------
              • Unit - Unpause (Picked unit)
              • Animation - Play (Picked unit)'s attack animation
              • Floating Text - Destroy (Load 1 of (Key (Picked unit)) in Hashtable_loading_BarIf the label is not found, this function returns NULL.)
              • Set Loading_Bar_count = (Loading_Bar_count - 1)
              • Trigger - Turn on (Load 1 of (Key (Picked unit)) in Hashtable_loading_Bar)
              • Unit Group - Add (Picked unit) to (Load 9 of (Key (Picked unit)) in Hashtable_loading_Bar)
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable_loading_Bar
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Loading_Bar_count Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions

  • fireball loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Fireball_looping_group and do (Actions)
        • Loop - Actions
          • Set Fireball_Loop_Casting_Unit = (Picked unit)
          • Set Fireball_Loop_Casting_Position = (Position of (Picked unit))
          • Set Fireball_Loop_target_Position = (Load 2 of (Key (Picked unit)) in Fire_Ball_Hashtable)
          • Set Fireball_Loop_Dummy = (Load 9 of (Key (Picked unit)) in Fire_Ball_Hashtable)
          • Set Fireball_Loop_Dummy_Position = (Position of Fireball_Loop_Dummy)
          • Set Fireball_Loop_Dummy_Destinatio = (Fireball_Loop_Dummy_Position offset by 10.00 towards (Load 1 of (Key (Picked unit)) from Fire_Ball_Hashtable) degrees)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between Fireball_Loop_Casting_Position and Fireball_Loop_Dummy_Position) Equal to 0.00
            • Then - Actions
              • Game - Display to (All players) the text: FIRE START
              • Unit - Move Fireball_Loop_Dummy instantly to Fireball_Loop_Dummy_Destinatio
              • Special Effect - Create a special effect attached to the origin of Fireball_Loop_Dummy using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
              • Set Fireball_Loop_on = (Fireball_Loop_on + 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Terrain pathing at Fireball_Loop_Dummy_Destinatio of type Walkability is off) Equal to True
                • Then - Actions
                  • -------- BOEM!!!!!!! --------
                  • Set Fireball_Loop_on = (Fireball_Loop_on - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Fireball_Loop_on Less than 1
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                      • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Fire_Ball_Hashtable
                    • Else - Actions
                  • Unit - Kill Fireball_Loop_Dummy
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Number of units in (Units within 80.00 of Fireball_Loop_Dummy_Position matching ((((Matching unit) belongs to an enemy of (Owner of Fireball_Loop_Dummy)) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Eq Greater than 0
                    • Then - Actions
                      • -------- BOEM!!!!!!! --------
                      • Set Fireball_Loop_on = (Fireball_Loop_on - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Fireball_Loop_on Less than 1
                        • Then - Actions
                          • Trigger - Turn off (This trigger)
                          • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Fire_Ball_Hashtable
                        • Else - Actions
                      • Unit - Kill Fireball_Loop_Dummy
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between Fireball_Loop_Dummy_Position and Fireball_Loop_target_Position) Less than 15.00
                        • Then - Actions
                          • -------- BOEM!!!!!!! --------
                          • Set Fireball_Loop_on = (Fireball_Loop_on - 1)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Fireball_Loop_on Less than 1
                            • Then - Actions
                              • Trigger - Turn off (This trigger)
                              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Fire_Ball_Hashtable
                            • Else - Actions
                          • Unit - Kill Fireball_Loop_Dummy
                        • Else - Actions
                          • Unit - Move Fireball_Loop_Dummy instantly to Fireball_Loop_Dummy_Destinatio

Its just a start. But i wanted to test it for fun and check if things worked, But then i found out the trigger "fire loop" just dident even turned on....

ojea and all the hastables are created and set at map intalizion. The loading bar works fine, so the problem cant be of that:)
 

Attachments

  • HET SYSTEEM.w3x
    29.4 KB · Views: 99
Level 7
Joined
Jun 15, 2010
Messages
218
thanks for the tips:) btw, i now know why it dident worked.
  • Hashtable - Save Handle Offireball loop <gen> as 1 of (Key (Triggering unit)) in Hashtable_loading_Bar
This was saved as 1 of triggering unit. I thought if a save a real instead of a trigger that I could also save it as 1 of triggering unit. But that will overwrite it. stupid:p
 
Status
Not open for further replies.
Top