brand new jass beginner +rep for help

Laiev

Hey Listen!!
Reaction score
188
No, you can't add/remove variables to/from a struct after game started.

You can set/initializer then after game started.
 

Dirac

22710180
Reaction score
147
Well if you're dealing with a struct for heroes i recommend you to use AIDS or UnitIndexer and your struct would look like this
JASS:
struct SomeStruct extends array
	integer Agi
	integer Int
	integer Str

	private method AIDS_onCreate takes nothing returns nothing
		set this.Agi=GetHeroAgi(this.unit,false)
		set this.Int=GetHeroInt(this.unit,false)
		set this.Str=GetHeroStr(this.unit,false)
	endmethod
	
	private static method AIDS_filter takes unit u returns boolean
		return IsUnitHero(u)
	endmethod

	//! runtextmacro AIDS()
endstruct
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top