• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] AoE Fire Ring Effect

Status
Not open for further replies.
Level 3
Joined
Aug 4, 2007
Messages
45
Hi, I'm trying to make a spell where the caster creates a ring of fire around him, and i got the fire moving, but it just moves in a circle instead of creating a "ring of fire". May anyone tell me what I'm doing wrong/need to do?

(Below is the trigger I used)


Untitled Trigger 001
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Flame Destruction
Actions
Set ACenter = (Position of (Triggering unit))
Set AAngle = 0.00
Unit - Create 1 FlameWard for (Owner of (Triggering unit)) at (ACenter offset by 256.00 towards 0.00 degrees) facing Default building facing degrees
Set AMovingWard = (Last created unit)
Trigger - Turn on MovingWard <gen>


MovingWard
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
Set AAngle = (AAngle + 1.00)
Set AATempPoint = (ACenter offset by 256.00 towards AAngle degrees)
Unit - Move AMovingWard instantly to AATempPoint
Unit - Pause AMovingWard
Unit - Move AMovingWard instantly to (ACenter offset by 256.00 towards AAngle degrees)
Custom script: call RemoveLocation(udg_AATempPoint)
Set ATempCount = (ATempCount + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ATempCount Equal to 500
Then - Actions
Unit - Kill AMovingWard
Trigger - Turn off (This trigger)
Else - Actions
 
Level 3
Joined
Jan 15, 2010
Messages
47
Do you have a single "flame ward" moving in a circle? is the flame ward a single fire at a single point, or is it the whole flame circle?

The way im reading your trigger is the first trigger makes a flame ward, then the second trigger moves it in a circle. I would be guessing that the you should be creating "flame wards" at each point in the circle, instead of moving a single ward.
 
Well, I don't really know how you define the ring's creation, but, I will give you two solutions. The first one will instantly create a fire ring around you, while the second one will slowly create a ring around you.
1)
  • Trigger1
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Flame Destruction
  • Actions
    • Set Points[1] = (Position of (Triggering unit))
    • For each (IntegerA) from 1 to 10, do (Actions)
      • Loop - Actions
        • Set Points[2] = (Points[1] offset by 256.00 towards ((Real(IntegerA))*36.00) degrees
        • Unit - Create 1 FlameWard for (Owner of (Triggering unit)) at Points[2] facing default building degrees
        • Custom script: call RemoveLocation (udg_Points[2])
    • Custom script: call RemoveLocation (udg_Points[1])
The ((Real(IntegerA))*36.00) is through "Conversion - Convert Integer to Real" (when it asks you for a value, go to "Arithmetic" and scroll to the function I just described).

2)
  • Trigger0
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Hashtable - Create a hashtable
    • Set Hashtable = (Last created hashtable)
  • Trigger
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Flame Destruction
  • Actions
    • Hashtable - Save 0.00 as (Key(angle)) of (Key(Triggering unit)) in Hashtable
    • Unit - Add (Triggering unit) to Temp_Group
    • Trigger - Turn on Trigger3 <gen>
  • Trigger3
  • Events
    • Time - Every 0.05 seconds of game-time
  • Conditions
  • Actions
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Temp_Group is empty) Equal to True
      • Then - Actions
        • Trigger - Turn off (This trigger)
      • Else - Actions
        • Set Angle = (Load (Key(angle)) of (Key(Picked unit)) from Hashtable
        • Hashtable - Save (Angle + 36.00) as (Key(angle)) of (Key(Picked unit)) in Hashtable
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • Angle Less than 360.00
          • Then - Actions
            • Unit Group - Pick every unit in (Temp_Group) and do (Actions)
              • Loop - Actions
                • Set Points[1] = (Position of (Picked unit))
                • Set Points[2] = (Points[1] offset by 256.00 towards Angle degrees)
                • Unit - Create 1 Flameward for (Owner of (Picked unit)) at Points[2] facing default building degrees
                • Unit - Add a 5.00 seconds generic expiration timer to (Last created unit)
                • Custom script: call RemoveLocation (udg_Points[1])
                • Custom script: call RemoveLocation (udg_Points[2])
          • Else - Actions
            • Unit Group - Remove (Picked unit) from (Temp_Group)
            • Hashtable - Clear all child hashtables of (Key(Picked unit)) in Hashtable
Fore more about hashtables,
[•] http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/
 
Level 3
Joined
Aug 4, 2007
Messages
45
thanks for the help, it worked perfectly
i was just wondering if you could tell me how to make the AoE bigger on the first trigger? i tried changing 256 to 512 and it made the AoE bigger but only created the flames at certain points on the circle, so it left open spaces, while I am trying to creates flames surrounding the caster.
thanks for any help in advance.
 
Yes, it's because the circle gets wider, so the angles do not respond in the previous size properly. When you deal with such an issue, simply increase the number of IntegerA. So, use For each (Integer A) from 1 to 20, do (Actions). The new number though will require new values for the circle, so, if you use 20, make sure that "(Real(IntegerA))*36.00" is now "(Real(IntegerA))*18.00". Generally, just divide 360.00 to the Integer A number you add. So, 360/20 in this case.
 
Status
Not open for further replies.
Top