Back then in WC3 editors, I can do something like for each intergerA from 1 to 100, do actions. And in the action I would do something like.... uh... Kill Variable[IntegerA].
In Starcraft 2 Editor, Do I need to define my own IntegerA variable now? Or is there a preset one like the WC3 editor?
Edit: Also, can anyone tell me how to get a trigger to constantly detect for a certain "unit-type"? Like say I want every single templar who has unit property energy of so and so, use psi storm in region?
I just need the trigger to detect certain unit types in the If section, that's all.
Yes. Just make a local variable of type integer and name it A, or B, or whatever you like.
Well there's no "constantly" in the editor, but you could use a periodic event to check really rapidly.
Thanks for answering my first part but as for the second part I needed help with, yes I am using perodic event as well. I need help setting up a Unit-Type checking. Any ideas how I should approach this?
I'm thinking of something like pick all units and if picked units = to the units in my variable it does so and so.
Var CurUnitType(UnitType)
Var CurUnitCatalogName(String)
Actions:
- set CurUnitType = Unit Type of (triggering unit)
- TextMessage( conversion(Game Link to Text(CurUnitType)))
- set CurUnitCatalogName = conversion(GameLink to string(CurUnitType))
- Set Catalog Field Value (Units, CurUnitCatalogName, "LifeMax",500,Triggering Player)
This would basically set the MaxLife for any type of unit that enters the region .... it would set the maxlife for the [unit type] for the triggering player it effects all units of the type owned by a specific player when you modify the Catalog
Back then in WC3 editors, I can do something like for each intergerA from 1 to 100, do actions. And in the action I would do something like.... uh... Kill Variable[IntegerA].
In Starcraft 2 Editor, Do I need to define my own IntegerA variable now? Or is there a preset one like the WC3 editor?
Edit: Also, can anyone tell me how to get a trigger to constantly detect for a certain "unit-type"? Like say I want every single templar who has unit property energy of so and so, use psi storm in region?
I just need the trigger to detect certain unit types in the If section, that's all.
Yes. Just make a local variable of type integer and name it A, or B, or whatever you like.
Well there's no "constantly" in the editor, but you could use a periodic event to check really rapidly.
Thanks for answering my first part but as for the second part I needed help with, yes I am using perodic event as well. I need help setting up a Unit-Type checking. Any ideas how I should approach this?
I'm thinking of something like pick all units and if picked units = to the units in my variable it does so and so.
bump
Anyone know how to find unit type?
Event - Unit Enters Region
Var CurUnitType(UnitType)
Var CurUnitCatalogName(String)
Actions:
- set CurUnitType = Unit Type of (triggering unit)
- TextMessage( conversion(Game Link to Text(CurUnitType)))
- set CurUnitCatalogName = conversion(GameLink to string(CurUnitType))
- Set Catalog Field Value (Units, CurUnitCatalogName, "LifeMax",500,Triggering Player)
This would basically set the MaxLife for any type of unit that enters the region .... it would set the maxlife for the [unit type] for the triggering player it effects all units of the type owned by a specific player when you modify the Catalog
What SouLCarverRR said pretty much, Unit Type of Unit is the function you need.
Under conditions there is a choice that says (unit type of unit) select that then allows you to choose a specific unit as a condition.