• 🏆 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] For each Integer A

Status
Not open for further replies.
Level 7
Joined
May 18, 2010
Messages
264
  • Unit CreationSetup
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 0 to 8, do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for Players[0] emitting Visibility across Vision1 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[0] emitting Visibility across Vision2 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[0] emitting Visibility across Vision3 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[0] emitting Visibility across Vision4 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[0] emitting Visibility across Vision5 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[0] emitting Visibility across Vision6 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[0] emitting Visibility across Vision7 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[0] emitting Visibility across Vision8 <gen>
Now where i am wrong here
(and fix me plx)


EDIT: ... Ok my problem is this is not working
and i dont know why...
*i want from from Varibale (Player) Players(array)1 to 8
to do actions Enable the visibility at Vision 1,2...,7,8
 
Easy mistake there my friend,
when you are looping a trigger using the following.
  • Do Multiple ActionsFor each (Integer A) from 0 to 8, do (Actions)
Also i'd change that "0" to a "1"
Then you need to change the value for the Prefix on the action.
This is the part found between the two "["
So its simply changing the "0" on each of these triggers.
  • Visibility - Create an initially Enabled visibility modifier for Players[0] emitting Visibility across Vision8 <gen>
To a simple
  • Visibility - Create an initially Enabled visibility modifier for Players[Integer A] emitting Visibility across Vision8 <gen>
I hope i helped and allowed you to understand what i mean.

This meaning your trigger will look like this
  • Unit CreationSetup
  • Events
    • Time - Elapsed game time is 0.10 seconds
  • Conditions
  • Actions
    • Do Multiple ActionsFor each (Integer A) from 0 to 8, do (Actions)
  • Loop - Actions
    • Visibility - Create an initially Enabled visibility modifier for Players[Integer A] emitting Visibility across Vision1 <gen>
    • Visibility - Create an initially Enabled visibility modifier for Players[Integer A] emitting Visibility across Vision2 <gen>
    • Visibility - Create an initially Enabled visibility modifier for Players[Integer A] emitting Visibility across Vision3 <gen>
    • Visibility - Create an initially Enabled visibility modifier for Players[Integer A] emitting Visibility across Vision4 <gen>
    • Visibility - Create an initially Enabled visibility modifier for Players[Integer A] emitting Visibility across Vision5 <gen>
    • Visibility - Create an initially Enabled visibility modifier for Players[Integer A] emitting Visibility across Vision6 <gen>
    • Visibility - Create an initially Enabled visibility modifier for Players[Integer A] emitting Visibility across Vision7 <gen>
    • Visibility - Create an initially Enabled visibility modifier for Players[Integer A] emitting Visibility across Vision8 <gen>
 
Level 7
Joined
May 18, 2010
Messages
264
WOW never had such a gr8 description

I complety get it ... 1 in 100
  • Unit CreationSetup
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision1 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision2 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision3 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision4 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision5 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision6 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision7 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision8 <gen>
I hope its working going test now

EDIT: thx on the [Integer A]
didnt know i need to put it insted of numbers
DONE FIXED CLOSED
 
I complety get it ... 1 in 100
  • Unit CreationSetup
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision1 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision2 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision3 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision4 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision5 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision6 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision7 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[(Integer A)] emitting Visibility across Vision8 <gen>
I hope its working going test now

EDIT: thx on the [Integer A]
didnt know i need to put it insted of numbers
DONE FIXED CLOSED

Glad i was able to help,
it never hurts to ask around on the forums for help
No matter how small or big the problem.
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
You double posted this problem, in World Editor helping zone and Triggers & Scripts.

Better use variable instead of integer, integer A is sometimes buggy and if you use other triggers with GetForLoopA, there might be wierd events around.

You were looping nine times instead of 8 as it should be (from 0 to there are 9 arrays).

Better use:
  • Unit CreationSetup
    • Events
      • Time - Elapsed game time is 0.10 seconds
    • Conditions
    • Actions
      • Do Multiple ActionsFor each tempInt from 1 to 8, do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for Players[tempInt] emitting Visibility across Vision1 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[tempInt] emitting Visibility across Vision2 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[tempInt] emitting Visibility across Vision3 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[tempInt] emitting Visibility across Vision4 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[tempInt] emitting Visibility across Vision5 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[tempInt] emitting Visibility across Vision6 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[tempInt] emitting Visibility across Vision7 <gen>
          • Visibility - Create an initially Enabled visibility modifier for Players[tempInt] emitting Visibility across Vision8 <gen>
 
Status
Not open for further replies.
Top