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

Can you loop setting variables?

Status
Not open for further replies.
Level 8
Joined
Aug 1, 2008
Messages
420
Like... if i have Point Array 10, and 10 locations i wanna set them in
can i loop them so i dont have to do it manually?
 
Level 7
Joined
Dec 3, 2008
Messages
189
Like... if i have Point Array 10, and 10 locations i wanna set them in
can i loop them so i dont have to do it manually?

I still don't really know what you mean, but maybe when you have an Array-Variable with an Index (var[x]) you could make a trigger like:

  • Var
  • Events
    • Every 2.00 seconds
  • Conditions
  • Actions
    • Set MyVar[x+1] = RegionXXX
I dont really know whether something like that would work, but you should test it :)

DarkLordX
 
Level 8
Joined
Nov 9, 2008
Messages
502
Hmm. I get the feeling you're talking about the variables you set at map init.

The simple answer is no. How would you convert a loop integer into your precise grid locations (points) or in other words, how would the loop know where the location is without putting it into a variable in the first place?

I think what you're talking about borders on the use of Hash Tables, but I'm no expert. Tell me if I'm wrong.
 
Level 8
Joined
Aug 1, 2008
Messages
420
Nah you were right. Like looping through the locations setting them. I was thinking of that when i was writing my 2nd answer :p
Oh well, thanks for replying. Because i had loads of variables to set and it was pissing me off.
 
Level 8
Joined
Nov 9, 2008
Messages
502
Ah yeh if there is some kind of patter to it you can find a formula but you have to ask yourself if it's worth it.
 
Status
Not open for further replies.
Top