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

[Trigger] Problem with "For each (Integer[Index[X]]"... etc.

Status
Not open for further replies.
Level 5
Joined
Nov 17, 2010
Messages
28
Hey guys, I have a problem with the MUI, basically what I want is to create multiple Dummys with a variable, and not having to September dummy_1 [Index [1] = (Last Created Unit), Set dummy_2 [Index [1] = (Last Created Unit), etc.

I want to somehow create many dummy and not have to make a variable for each of them.

I try doing two Index, for example.

  • For each (Integer [Index[IndexDummys][1]])) From 1 to 12
  • Create 1 Dummy for (Owner of (Caster[Index[1])) at X position facing X degress.
  • Set Dummy[Index[IndexDummys[1]] = (Last Created Unit)
You can see that, on the uploaded map.

It did not work.

PLEASE HELPMEE!!!
 

Attachments

  • Para probar spells.w3x
    100.9 KB · Views: 41
Level 16
Joined
Jun 24, 2009
Messages
1,409
what the hell?
just add the dummies into a unit group
for example a simple move:
  • Unit Group - Pick every unit in DummyGroup[Integer] and do (Actions)
    • Loop - Actions
      • Set TempPoint = Position of (Picked Unit)
      • Set TempPoint2[SSInteger] = (CenterPoint[Integer] offset by 150.00 towards (Angle from CenterPoint[Integer] to TempPoint)+10.00 degrees)
      • Unit - Move (Picked unit) instantly to TempPoint2, facing Default facing degrees
that one moves the dummies around the center
 
I have made it working, some problems I found:
• The dummies were not saved right, resulting only one dummy to be saved.
• The loop has had the "Unit starts the effect of an ability" as the event, not "Time - Every X seconds of game-time".
• Leaks.
• The spell would only refer to a preset unit, Paladin 0046 <gen>, so it definitely can't be MUI.

Note: I left the indexing recycling to you, I just made it functional.

-> "Duration[]" variable is the duration of the spell. In this very example, it's (Level of ability + 5).
 

Attachments

  • Para probar spells1.w3x
    101.4 KB · Views: 38
Level 5
Joined
Nov 17, 2010
Messages
28
I have made it working, some problems I found:
• The dummies were not saved right, resulting only one dummy to be saved.
• The loop has had the "Unit starts the effect of an ability" as the event, not "Time - Every X seconds of game-time".
• Leaks.
• The spell would only refer to a preset unit, Paladin 0046 <gen>, so it definitely can't be MUI.

Note: I left the indexing recycling to you, I just made it functional.

-> "Duration[]" variable is the duration of the spell. In this very example, it's (Level of ability + 5).

Thanks man, thats right for me, :D I<3U
 
Last edited by a moderator:
Status
Not open for further replies.
Top