• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Default value of Variables

Status
Not open for further replies.
Level 14
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 14
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