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

Default value of Variables

Status
Not open for further replies.
Level 13
Joined
Mar 4, 2009
Messages
1,156
for example i have an integer variable (array)

variables>integer>edit>default>

i tried to set default number of integer variable to be 13 but its not working,why?

i know i could set it with triggers but i wanna do it on this way (just editing the variable)...
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
If you set integer array size to 10 for example and set initial value to 132, then this trigger will create a unit:

  • Untitled Trigger 096
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
      • AAAAAA1[7] Equal to 132
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of Region 004 <gen>) facing Default building facing degrees
So it really should work.
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
If you set integer array size to 10 for example and set initial value to 132, then this trigger will create a unit:

  • Untitled Trigger 096
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
      • AAAAAA1[7] Equal to 132
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of Region 004 <gen>) facing Default building facing degrees
So it really should work.
yeah thanks,i didn't know i have to set size...
 
Status
Not open for further replies.
Top