• 🏆 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!

Cant find my problem plz help.

Status
Not open for further replies.
Level 6
Joined
Oct 4, 2011
Messages
226
Okay solved the no effect bug, I still had the custom script setting the integer to the caster unit instead of the dummy unit.
Still it heals the target instantly and I ahvnt really tested MUI capabilities yet. still need help uploaded changed triggers.

  • CA 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to TBD (Cleric)
    • Actions
      • Set CA1_CasterUnit = (Triggering unit)
      • Set CA1_OwnerPlayer = (Owner of CA1_CasterUnit)
      • Set CA1_TargetUnit = (Target unit of ability being cast)
      • Set CA1_CastLoc = (Position of CA1_CasterUnit)
      • Set CA1_TargetLoc = (Position of CA1_TargetUnit)
      • Unit - Create 1 Restoration (Projectile) for CA1_OwnerPlayer at CA1_CastLoc facing (Angle from CA1_CastLoc to CA1_TargetLoc) degrees
      • Unit Group - Add (Last created unit) to CA1_DummyGroup
      • Set CA1_TempDummyUnit = (Last created unit)
      • Custom script: set udg_CA1_IdInteger = GetHandleId(udg_CA1_TempDummyUnit)
      • Hashtable - Save Handle OfCA1_CasterUnit as (Key caster) of CA1_IdInteger in CA1_Hashtable
      • Hashtable - Save Handle OfCA1_TargetUnit as (Key target) of CA1_IdInteger in CA1_Hashtable
      • Hashtable - Save (Distance between CA1_CastLoc and CA1_TargetLoc) as (Key distance) of CA1_IdInteger in CA1_Hashtable
      • Hashtable - Save 60.00 as (Key heal) of CA1_IdInteger in CA1_Hashtable
      • Hashtable - Save 3.00 as (Key speed) of CA1_IdInteger in CA1_Hashtable
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CA 1 Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on CA 1 Loop <gen>
        • Else - Actions

  • CA 1 Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in CA1_DummyGroup) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in CA1_DummyGroup and do (Actions)
            • Loop - Actions
              • Set CA1_TempUnit = (Picked unit)
              • Custom script: set udg_CA1_IdInteger = GetHandleId(udg_CA1_TempUnit)
              • Set CA1_TempLoc1 = (Position of CA1_TempUnit)
              • Set CA1_TempLoc3 = (Position of (Load (Key target) of CA1_IdInteger in CA1_Hashtable))
              • Set CA1_TempReal = (Angle from CA1_TempLoc1 to CA1_TempLoc3)
              • Set CA1_TempLoc2 = (CA1_TempLoc1 offset by (Load (Key speed) of CA1_IdInteger from CA1_Hashtable) towards CA1_TempReal degrees)
              • Set CA1_DistanceReal = (Load (Key distance) of CA1_IdInteger from CA1_Hashtable)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CA1_DistanceReal Greater than or equal to 8.00
                • Then - Actions
                  • Hashtable - Save (Distance between CA1_TempLoc1 and CA1_TempLoc2) as (Key distance) of CA1_IdInteger in CA1_Hashtable
                  • Unit - Move (Load (Key dummy) of CA1_IdInteger in CA1_Hashtable) instantly to CA1_TempLoc2, facing CA1_TempReal degrees
                • Else - Actions
                  • Unit - Remove CA1_TempUnit from the game
                  • Unit - Set life of (Load (Key target) of CA1_IdInteger in CA1_Hashtable) to ((Life of (Load (Key target) of CA1_IdInteger in CA1_Hashtable)) + (Load (Key heal) of CA1_IdInteger from CA1_Hashtable))
                  • Unit Group - Remove CA1_TempUnit from CA1_DummyGroup
                  • Hashtable - Clear all child hashtables of child CA1_IdInteger in CA1_Hashtable
              • Custom script: call RemoveLocation(udg_CA1_TempLoc1)
              • Custom script: call RemoveLocation(udg_CA1_TempLoc2)
              • Custom script: call RemoveLocation(udg_CA1_TempLoc3)
        • Else - Actions
          • Trigger - Turn off (This trigger)
 
Level 5
Joined
Jan 12, 2010
Messages
132
No need to move
  • Actions
    • Hashtable - Save Handle OfCA1_CasterUnit as (Key caster) of CA1_IdInteger in CA1_Hashtable
    • Hashtable - Save Handle OfCA1_TargetUnit as (Key target) of CA1_IdInteger in CA1_Hashtable
This wrong.
  • Actions
    • Hashtable - Save Handle OfCA1_CasterUnit as 1 of CA1_IdInteger in CA1_Hashtable
    • Hashtable - Save Handle OfCA1_TargetUnit as 2 of CA1_IdInteger in CA1_Hashtable
Now is good.
Did u get the ideea?

Thiss is one of my trigger for missle move.Oblivious adapted for my skill.You can use it like a template
  • Gun event
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
      • (Number of units in Gun_group2) Greater than or equal to 1
    • Actions
      • Unit Group - Pick every unit in Gun_group2 and do (Actions)
        • Loop - Actions
          • Set Hash_unit = (Picked unit)
          • Custom script: set udg_Hash_key = GetHandleId(udg_Hash_unit)
          • Set Temp_unit[1] = (Load 3 of Hash_key in Table_gun)
          • Set Temp_unit[2] = (Load 4 of Hash_key in Table_gun)
          • Set Temp_point[1] = (Position of (Picked unit))
          • Set Temp_point[2] = (Position of Temp_unit[1])
          • Set Temp_real[1] = (Distance between Temp_point[1] and Temp_point[2])
          • Set Temp_real[2] = (Angle from Temp_point[1] to Temp_point[2])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_real[1] Greater than or equal to 40.00
            • Then - Actions
              • Set Temp_point[3] = (Temp_point[1] offset by 40.00 towards Temp_real[2] degrees)
              • Unit - Move (Picked unit) instantly to Temp_point[3], facing Temp_real[2] degrees
              • Custom script: call RemoveLocation(udg_Temp_point[3])
            • Else - Actions
              • Set Temp_real[3] = (Load 1 of Hash_key from Table_gun)
              • Set Temp_real[4] = (Load 2 of Hash_key from Table_gun)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SFX_controller[(Player number of (Owner of (Picked unit)))] Equal to False
                • Then - Actions
                  • Unit - Create 1 Flare fx for (Owner of (Picked unit)) at Temp_point[1] facing Default building facing degrees
                  • Animation - Change (Last created unit)'s size to ((50.00 + (Temp_real[4] / 10.00))%, (50.00 + (Temp_real[4] / 10.00))%, (50.00 + (Temp_real[4] / 10.00))%) of its original size
                  • Unit - Turn collision for (Last created unit) Off
                  • Unit - Move (Last created unit) instantly to Temp_point[1]
                  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                • Else - Actions
              • Set Temp_group = (Units within Temp_real[4] of Temp_point[1] matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of (Picked unit))) Equal to True)))
              • Unit Group - Pick every unit in Temp_group and do (Actions)
                • Loop - Actions
                  • Set Temp_integer[2] = (Custom value of (Picked unit))
                  • If (Temp_integer[2] Equal to 2) then do (Set Temp_real[3] = (Temp_real[3] x 0.50)) else do (Do nothing)
                  • If (Temp_integer[2] Equal to 4) then do (Set Temp_real[3] = (Temp_real[3] x 2.00)) else do (Do nothing)
                  • Unit - Cause Temp_unit[2] to damage (Picked unit), dealing Temp_real[3] damage of attack type Spells and damage type Normal
              • Custom script: call DestroyGroup(udg_Temp_group)
              • Hashtable - Clear all child hashtables of child Hash_key in Table_gun
              • Unit - Remove (Picked unit) from the game
              • Unit Group - Remove (Picked unit) from Gun_group2
          • Custom script: call RemoveLocation(udg_Temp_point[1])
          • Custom script: call RemoveLocation(udg_Temp_point[2])
 
Level 6
Joined
Oct 4, 2011
Messages
226
Thanks anyways your trigger is cool but its not helping me identify my probably half-brained mistake in my trigger. Its the same problem everytime just when you think your getting better you cant even do what you learned you were capable of, (really frustrated)
 
Last edited:
Level 6
Joined
Oct 4, 2011
Messages
226
Yeah that was it =) seems to work good now I upped my duration speed now that it makes a unit and it looks pretty good. +rep if I could.
 
Status
Not open for further replies.
Top