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

help with trigger

Status
Not open for further replies.
Level 4
Joined
Dec 4, 2014
Messages
97
i want to make a aeo spell and i want to create a dummy at the position of my area i tried it with point of abbility being cast but i didnt worked
 
Level 4
Joined
Dec 4, 2014
Messages
97
  • Meteor
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Meteor
    • Actions
      • -------- - --------
      • Set Madara_Caster_2 = (Triggering unit)
      • -------- - --------
      • Unit - Pause Madara_Caster_2
      • -------- - --------
      • Set Madara_Damage = ((Real((Intelligence of Madara_Caster_2 (Exclude bonuses)))) x 14.00)
      • -------- - --------
      • Set Madara_Point_4 = (Position of Madara_Caster_2)
      • -------- - --------
      • Set Madara_Point_5 = (Target point of ability being cast)
      • -------- - --------
      • Set Madara_Angel_2 = (Angle from Madara_Point_4 to Madara_Point_5)
      • -------- - --------
      • Unit - Create 1 Meteor dummy for (Owner of Madara_Caster_2) at (Target point of ability being cast) facing Default building facing (270.0) degrees
      • -------- - --------
      • -------- - --------
      • Set Madara_Dummy_2 = (Last created unit)
      • -------- - --------
      • Animation - Change Madara_Dummy_2 flying height to 250.00 at 0.00
      • -------- - --------
      • Trigger - Turn on Meteor Loop <gen>
      • -------- - --------
      • Unit - Unpause Madara_Caster_2
      • -------- - --------
      • Custom script: call RemoveLocation(udg_Madara_Point_4)
      • -------- - --------
      • Custom script: call RemoveLocation(udg_Madara_Point_5)
      • -------- - --------
  • Meteor Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- - --------
      • Set Madara_Point_6 = (Madara_Point_5 offset by 256.00 towards Madara_Angel_2 degrees)
      • -------- - --------
      • Unit - Move Madara_Dummy_2 instantly to Madara_Point_6
      • -------- - --------
      • Wait 2.00 seconds
      • -------- - --------
      • Unit - Create 1 Nuclear Explosion for (Owner of Madara_Caster_2) at Madara_Point_6 facing Default building facing (270.0) degrees
      • -------- - --------
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • -------- - --------
      • Unit - Create 1 Sand explosion for (Owner of Madara_Caster_2) at Madara_Point_6 facing Default building facing (270.0) degrees
      • -------- - --------
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • -------- - --------
      • Set Madara_Group = (Units within 500.00 of Madara_Point_5 matching ((((Matching unit) is A structure) Equal to (==) True) and ((((Matching unit) is Magic Immune) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and (((Matching unit) belongs to an enemy
      • -------- - --------
      • Unit Group - Pick every unit in UnitGroup_Madara_1 and do (Actions)
        • Loop - Actions
          • -------- - --------
          • Unit - Cause Madara_Caster_2 to damage (Picked unit), dealing Madara_Damage damage of attack type Normal and damage type Normal
          • -------- - --------
      • Unit - Add a 3.00 second Generic expiration timer to Madara_Dummy_2
      • -------- - --------
      • Custom script: call RemoveLocation(udg_Madara_Point_6)
      • -------- - --------
      • Trigger - Turn off (This trigger)
      • -------- - --------
 
Level 13
Joined
Dec 21, 2010
Messages
541
Putting wait inside a 0.03 per second ... this is very very very wrong..
on your first trigger create a REAL variable >>this is for replacing the WAIT action!!!
  • add this on your first trigger
  • set - Meteor_Height = 1000
  • set - Meteor_Speed = 10
and make sure to put the Height before turning on the 2nd trigger...
also remove the unpause Madara_Caster 2 in the first trigger because I think you're channeling the meteor?? so I put it on the 2nd trigger

  • Meteor Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set - Meteor_Height = Meteor_Height - Meteor_Speed
      • Animation - Change Madara_Dummy_2 flying height to Meteor_Height at 0.00
      • If all conditions are true then do actions
        • if conditions
          • (Meteor_Height) is Less than or equal to 0
        • then - actions
          • Trigger - Turn off (This trigger)
          • Set - Madara_Point_6 = Position of Madara_Dummy_2
          • Unit - Unpause Madara_Caster_2
          • Set - Meteor_Height = 0
          • Unit - Create 1 Nuclear Explosion for (Owner of Madara_Caster_2) at Madara_Point_6 facing Default building facing (270.0) degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Create 1 Sand explosion for (Owner of Madara_Caster_2) at Madara_Point_6 facing Default building facing (270.0) degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Set Madara_Group = (Units within 500.00 of Madara_Point_6 matching ((((Matching unit) is A structure) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy
          • Unit Group - Pick every unit in Madara_Group and do (Actions)
            • Loop - Actions
              • Unit - Cause Madara_Caster_2 to damage (Picked unit), dealing Madara_Damage damage of attack type Normal and damage type Normal
          • Unit - Add a 3.00 second Generic expiration timer to Madara_Dummy_2
          • Custom script: call DestroyGroup (udg_Madara_Group)
          • Custom script: call RemoveLocation(udg_Madara_Point_6)
        • else - actions
 
Last edited:
Level 14
Joined
Aug 30, 2004
Messages
909
I don't think they've caught the problem. I think the problem is that you remove MandaraPoint5 in the original trigger. This destroys that point. This means in your repeat trigger, you cannot use MandaraPoint5:

  • Set Madara_Point_6 = (Madara_Point_5 offset by 256.00 towards Madara_Angel_2 degrees)
This Mandara_Point_5 will reference a non-existent point. You'll need to hold on to that point and RemoveLocation the point only after the spell is done.
 
^His problem is:
i want to create a dummy at the position of my area i tried it with point of abbility being cast but i didnt worked
If he removes pause/unpause it will/should work, that he creates a unit onCast.
Because like now "TargetPointOfAbilityBeingCast" won't work properly iirc with unit being paused.
 
Level 13
Joined
Dec 21, 2010
Messages
541
Basically the unit is successfully created ...unfortunately the 2nd trigger moves the dummy
  • Set Madara_Point_6 = (Madara_Point_5 offset by 256.00 towards Madara_Angel_2 degrees)
  • -------- - --------
  • Unit - Move Madara_Dummy_2 instantly to Madara_Point_6
So.. he won't be able to see the dummy in the targetpoint because he moved it 256 offset from the targetpoint in every 0.03 seconds..
as darwin said...there is no reference for Madara_Point_5 so it will be referenced in the center of playable map area..
 
Status
Not open for further replies.
Top