xAnaMorphine
Active Member
- Reaction score
- 43
Trigger:
- set udg_Heroes[1] = 'H000'
The Units aren't preplaced, that is why I want to store them into an Array first. Sadly it doesn't work
set udg_Heroes = 039;H000039;
call Inventory.create(udg_Heroes, "Paladins", "Heavy Armors, Leather Armors, Cloth Armors, Shields")
Set heroes to integer and set it's value in JASS
JASS:set udg_Heroes = 039;H000039;
JASS:call Inventory.create(udg_Heroes, "Paladins", "Heavy Armors, Leather Armors, Cloth Armors, Shields")
tried, did not work or I did it wrong
You probably did it wrong.
Show us your complete function?
function Trig_dfg_Actions takes nothing returns nothing
set udg_Heroes = 039;H000039;
endfunction
//===========================================================================
function InitTrig_dfg takes nothing returns nothing
set gg_trg_dfg = CreateTrigger( )
call TriggerAddAction( gg_trg_dfg, function Trig_dfg_Actions )
endfunction
Inventory.create(039;H000039; //You should use the variable, here.
JASS:Inventory.create(039;H000039; //You should use the variable, here.
It was a long time since I used vJASS (or WE at all), but if I remember correctly you can do something like this:
JASS:
Correct me if I'm wrong.
Offtopic: What system do you use?
call Inventory.create()
set udg_Hero = GetUnitType(*gg_unit__your_unit_here*)
Am I allowed linking?
You should, instead of creating it at Map Init, just create it when it is bought from the tavern...
globals
set udg_Heroes = 039;H000039;
endglobals
globals
private integer udg_Heroes = 039;H000039;
endglobals
eerm...
JASS:globals set udg_Heroes = 039;H000039; endglobals
what kind of jass is this?
it should be:
JASS:globals private integer udg_Heroes = 039;H000039; endglobals
and later:
JASS:
and thats only a correct SYNTAX! now actually udg_Heroes should be a unit which you get when it enters the map...