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

This Trigger: (look)

Status
Not open for further replies.

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
  • Anel de Arvore
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Anel de Árvore
    • Actions
      • Set p1 = (Target point of ability being cast)
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set p2 = (p1 offset by 150.00 towards (Real((45 x (Integer A)))) degrees)
          • Destructible - Create a Summer Tree Wall at p2 facing (Random angle) with scale 1.00 and variation 0
          • Custom script: call RemoveLocation(udg_p2)
      • Custom script: call RemoveLocation(udg_p1)
This trigger I got from someone here on Hiveworkshop, it works like Dota Furion's Sprout (creates threes arround the target point). But this trigger doesn't remove the Trhees. WHen cast, the threes stay there forever or untill destroyed. Any help for remove them after 5 seconds ?
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
Well, yeah. All the trigger does is it creates trees. The game doesn't know what you want so it only does what is in the code, hence it only creates the trees.

Is this spell supposed to be MUI (= can be cast by multiple units at same time), MPI (can be cast by 1 unit of each player at the same time) or only by 1 unit?
If it can be cast by 1 unit only, then you can create Destructible array variable, use
  • Set your_var[Ingeter A] = Last created destructible
and then outside the loop start timer, which expires after 5 seconds.
Then make another trigger that is fired by that timer.
When that timer expires, loop through your_var[1-8] and destroy that destructible.

For MUI it would use similar, but will be way more complex.
 
  • Like
Reactions: hdm

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Well, yeah. All the trigger does is it creates trees. The game doesn't know what you want so it only does what is in the code, hence it only creates the trees.

Is this spell supposed to be MUI (= can be cast by multiple units at same time), MPI (can be cast by 1 unit of each player at the same time) or only by 1 unit?
If it can be cast by 1 unit only, then you can create Destructible array variable, use
  • Set your_var[Ingeter A] = Last created destructible
and then outside the loop start timer, which expires after 5 seconds.
Then make another trigger that is fired by that timer.
When that timer expires, loop through your_var[1-8] and destroy that destructible.

For MUI it would use similar, but will be way more complex.

And for MUI, can you Trigger here how would it look like ? What you mean with outiside ? Other trigger? The loop start timer can be a variable ?
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
  • For each integer variable from 1 to X do (Actions)
    • Loop - Actions
      • Command1
      • Command2
  • Command3
Commands 1 and 2 are inside the loop while command 3 is outside the loop, meaning commands 1 and 2 will be repeated X times, while command 3 will be executed only once.

Can't show how it will look MUI atm, the trigger would be quite complicated as you have to take into account each unit which casts it and then allocate which indexes you will use for that unit.

For the MUI: Basically, if you index the unit as 1, then you index its destructibles as 1-8; if you index the unit as 2, you index its destructibles as 9-16 and so on. You would need 1 general loop trigger and manually calculate the time; or use multiple timers.
 

hdm

hdm

Level 9
Joined
Nov 19, 2011
Messages
384
Can't show how it will look MUI atm.

Ok then... but tell me, for 1 unit only what you mean with outside ? Is it other trigger? The loop start timer can be a variable ? The other trigger fired by that timer starts with what event ?

EDIT: Wait, I think I got it.

EDIT AGAIN: Well I understood what your trick does. I made
  • Countdown Timer - Start Treetime as a One-shot timer that will expire in 5.00 seconds
And on other Trigger I made
  • Events
    • Time - Treetime expires
Is this what you mean ? Now I have to destoy the trees with actions ?

EDIT AGAIN AGAIN: It worked, +rep for you all. The problem now will be make it MUI.
 
Level 6
Joined
Mar 30, 2014
Messages
230
here add them on a DGroups and make a timer variables (base on the treegroup index) and when all clear just use the command remove
 
Status
Not open for further replies.
Top