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

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



EDit2 "i just figured this i should post this at Triggers and ..." thingy
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
You are wrong in not explaining your problem.

edit: So use Players[(Integer A)] and let the loop begin from 1. Integer A is the loop variable (as seen in the loop header) that steps from start to ending value while iterating. You can call it by an integer function "For Loop Integer A" (5th from top).
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
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