• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] after unit casts ability, they are supposed to cast it again targeting different

Status
Not open for further replies.
Level 12
Joined
Aug 10, 2004
Messages
1,141
After a little bit, it starts to lag or something, I'm not sure

Either way I'm not sure how to do it

I have tried using casting and triggering unit
And begins, finishes, stops, starts effect

With stops, it lasts a little longer going on a second iteration, but thats it


These are the two triggers that break over time

  • natural movement
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Far Sight
    • Actions
      • Set temppoint = (Position of (Casting unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Casting unit)) Equal to Villager (Male 2)
          • (corn <gen> contains temppoint) Equal to True
        • Then - Actions
          • Set temppoint = ((Position of (Casting unit)) offset by (Random real number between 0.00 and 30.00) towards (Random real number between 0.00 and 359.99) degrees)
          • Unit - Order (Casting unit) to Orc Far Seer - Far Sight temppoint
          • Custom script: call RemoveLocation(udg_temppoint)
        • Else - Actions
          • Set tempgroup = (Units of type Farm)
          • For each (Integer A) from 0 to ((Number of units in tempgroup) - 1), do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Casting unit) is in civstry2[(Integer A)]) Equal to True
                • Then - Actions
                  • Set temppoint = ((Position of farms[(Integer A)]) offset by (Random real number between 0.00 and 1000.00) towards (Random real number between 0.00 and 359.99) degrees)
                  • Unit - Order (Casting unit) to Orc Far Seer - Far Sight temppoint
                  • Custom script: call RemoveLocation(udg_temppoint)
                • Else - Actions
          • Custom script: call DestroyGroup(udg_tempgroup)
  • clock for spawning and removing
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (In-game time of day) Greater than or equal to 6.00
          • (In-game time of day) Less than or equal to 9.00
        • Then - Actions
          • Set tempgroup = (Units of type Farm)
          • For each (Integer A) from 0 to ((Number of units in tempgroup) - 1), do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in civstry2[(Integer A)]) Less than 4
                  • ((Random real number between 0.25 and 1.00) x ((In-game time of day) - 5.00)) Greater than or equal to 1.00
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random real number between 0.00 and 2.00) Less than or equal to 1.00
                    • Then - Actions
                      • Set temppoint = (Position of farms[(Integer A)])
                      • Unit - Create 1 Villager (Male 2) for Neutral Passive at temppoint facing Default building facing degrees
                      • Unit Group - Add (Last created unit) to civstry2[(Integer A)]
                      • Set temppoint = ((Position of farms[(Integer A)]) offset by (Random real number between 0.00 and 1000.00) towards (Random real number between 0.00 and 359.99) degrees)
                      • Unit - Order (Last created unit) to Orc Far Seer - Far Sight temppoint
                      • Custom script: call RemoveLocation(udg_temppoint)
                    • Else - Actions
                      • Set temppoint = (Position of farms[(Integer A)])
                      • Unit - Create 1 Villager (Female) for Neutral Passive at temppoint facing Default building facing degrees
                      • Unit Group - Add (Last created unit) to civstry2[(Integer A)]
                      • Set temppoint = ((Position of farms[(Integer A)]) offset by (Random real number between 0.00 and 1000.00) towards (Random real number between 0.00 and 359.99) degrees)
                      • Unit - Order (Last created unit) to Orc Far Seer - Far Sight temppoint
                      • Custom script: call RemoveLocation(udg_temppoint)
                • Else - Actions
          • Custom script: call DestroyGroup(udg_tempgroup)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (In-game time of day) Greater than or equal to 18.00
          • (In-game time of day) Less than or equal to 24.00
        • Then - Actions
          • Set tempgroup = (Units of type Farm)
          • For each (Integer A) from 0 to ((Number of units in tempgroup) - 1), do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in civstry2[(Integer A)]) Greater than 0
                • Then - Actions
                  • Unit Group - Pick every unit in civstry2[(Integer A)] and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between (Position of (Picked unit)) and (Position of farms[(Integer A)])) Less than or equal to 150.00
                        • Then - Actions
                          • Unit - Remove (Picked unit) from the game
                          • Unit Group - Remove (Picked unit) from civstry2[(Integer A)]
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Random real number between 0.25 and 1.00) x ((In-game time of day) - 17.00)) Greater than or equal to 1.00
                            • Then - Actions
                              • Set temppoint = (Position of farms[(Integer A)])
                              • Unit - Order (Last created unit) to Move To temppoint
                              • Custom script: call RemoveLocation(udg_temppoint)
                            • Else - Actions
                • Else - Actions
                  • Custom script: call DestroyGroup(udg_civstry2[GetForLoopIndexA()])
          • Custom script: call DestroyGroup(udg_tempgroup)
        • Else - Actions
 

Attachments

  • civ concept.w3x
    21.8 KB · Views: 53
Last edited:
Status
Not open for further replies.
Top