One method I can think of, is to monitor when a unit is build, then add it to a unit group. Then pick each unit in the unit group and spawn a unit of the unit type of picked unit in the region you want.
Something like that. When a unit is finished constructing, add finished unit to unit group. If the unit uses a "Sell" ability, remove it from unit group.
You can have an Integer global variable, with an array of 12.
Then you put all players in a player group at the start of the game, and pick each player in the player group and set IntegerVariable[Picked Player] to an increasing value.
Oh, totally forgot to explain my thought process on that part.
Make the blocker units have a collision type such as forcefield (don't use forcefield, use something your units that should be able to pass does not have) and then you can have players on team 1 have units which does not collide with those blocker units, and players on team 2 the oposite.
This might need a Team 1 version and a team 2 version for each unit. I don't know if you can modify collision types with triggers.
I think you need to explain what you've done so far. What do you mean by "put the stim pack in the tech lab"?
Did you add the research ability and command card button? Or did you create an all new research ability and stim pack ability? What do you mean by the Thor not showing it, but being able to use it? We need more context to be able to help you :)
It's my experience that using a repeat action creates less lag, than having a trigger like that. I've made a trigger that is run at the start of the map, which repeats forever. The repeat action has an if/then/else action, which checks if a Unit Variable is empty, if not, set a dialog item to the health pf the variable unit.
Then I have a 0.1 wait in the end of the repeat action.
This runs pretty smooth for me.
HeroPanelUpdateEventsGame-MapinitializationLocalVariablesX=0<Integer>ConditionsActionsGeneral-Repeat(Actions)foreverActionsPlayerGroup-Pickeachplayerin(ActivePlayers)anddo(Actions)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfActiveHero[(Pickedplayer)] != No Unit
Then
Dialog - Set Hero Panel - Shields Bar size to ((Integer((205.0 * ((Active Hero[(Pickedplayer)] Shields (Percent) (Current)) / 100.0)))), 14) for (Player group((Picked player)))
Dialog - Set Hero Panel - Health Bar size to ((Integer((205.0 * ((Active Hero[(Pickedplayer)] Life (Percent) (Current)) / 100.0)))), 24) for (Player group((Picked player)))
Dialog - Set Hero Panel - Energy Bar size to ((Integer((205.0 * ((Active Hero[(Pickedplayer)] Energy (Percent) (Current)) / 100.0)))), 14) for (Player group((Picked player)))
General - If (Conditions) then do (Actions) else do (Actions)
If
(Active Hero[(Pickedplayer)] Shields (Current)) <= 1.0
Then
Dialog - Hide Hero Panel - Shields Bar for (Player group((Picked player)))
Else
Dialog - Show Hero Panel - Shields Bar for (Player group((Picked player)))
General - If (Conditions) then do (Actions) else do (Actions)
If
(Active Hero[(Pickedplayer)] is alive) == False
Then
Dialog - Hide Hero Panel - Shields Bar for (Player group((Picked player)))
Dialog - Hide Hero Panel - Health Bar for (Player group((Picked player)))
Dialog - Hide Hero Panel - Energy Bar for (Player group((Picked player)))
Else
Dialog - Show Hero Panel - Health Bar for (Player group((Picked player)))
Dialog - Show Hero Panel - Energy Bar for (Player group((Picked player)))
Else
General - Wait 0.1 Game Time seconds
My map has a custom healthbar in the top corner like in the campain, thus the adjustment of size.
And if you really wan't to reduce lag, you can use this instead of Pick each player in as it creates less lag than calling a player group and so on.
A Variable is like a box, the type of the variable is the shape of the box. So a Unit type variable can store unit types, an Integer variable can store integers and so on.
There are two types of variables, Global and Local. A Global variable is the ones that are created and listed among the triggers, and the local ones are the ones created in the individual triggers. A global variable can be called in all triggers, and a local can only be called in the one it has been made.
If you create a unit, you can set a Unit, Global variable to Last created unit and later on refer to that variable to refer to the unit.
Also Variables can have arrays (sub parts of the variable), which can look like this GlobalVariable1[0]. This allows you to set your Unit variable to UnitVariable[Owner of(Last Created Unit)] = Last Created Unit for each player, and then later be able to refer to the individual units for each player.
Arrays also have dimensions, so you can have a variable look like this GlobalVariable[0][0]. A way to look at it, is to imagine it as a checker board, or a coordinate system, so 0,0 is field, 0,1 another field with a different value, 1,0 a third value, and so on. I hope it makes sence, othervise I'll try to explain it further.
0
https://www.sc2mapster.com/forums/development/ui-development/165538-sc2layout-snippits?comment=11
The linked file in this comment is not available in, and I'd like to do this. How can it be done?
Atleast the command card moved and only showing 10x1.
Oh.. Found it in a post below, didnt realise that was it. This is solved.
0
One method I can think of, is to monitor when a unit is build, then add it to a unit group. Then pick each unit in the unit group and spawn a unit of the unit type of picked unit in the region you want.
Something like that. When a unit is finished constructing, add finished unit to unit group. If the unit uses a "Sell" ability, remove it from unit group.
0
If you set a unit's death time to -1 and use a revive action, it will retain it's exp and levels (even though you don't need it),
0
You can have an Integer global variable, with an array of 12.
Then you put all players in a player group at the start of the game, and pick each player in the player group and set IntegerVariable[Picked Player] to an increasing value.
something like this
Then instead of using triggering player (or whatever you need) in your map, you use IntegerVariable[Triggering Player]
0
@DrSuperEvil: Go
Oh, totally forgot to explain my thought process on that part.
Make the blocker units have a collision type such as forcefield (don't use forcefield, use something your units that should be able to pass does not have) and then you can have players on team 1 have units which does not collide with those blocker units, and players on team 2 the oposite.
This might need a Team 1 version and a team 2 version for each unit. I don't know if you can modify collision types with triggers.
0
Othervise you could create a line of invisible units in a line where the gate should block, and have a trigger remove them when the gate is destroyed.
0
I think you need to explain what you've done so far. What do you mean by "put the stim pack in the tech lab"?
Did you add the research ability and command card button? Or did you create an all new research ability and stim pack ability? What do you mean by the Thor not showing it, but being able to use it? We need more context to be able to help you :)
0
What exactly do you mean by clanname? If the players name is ClanNameRohime then do X actions? Please elaborate what you mean by clan?
0
@Ari2010: Go
In your first image, you are using Created Unit. That does not seem to refer to anything. You probably want to use Picked Unit.
0
Just a wild gues, does the ability have a requirement set in the commands field or in the command card of the owning unit?
0
@greythepirate: Go
True. I'm no wizard in the UI editor sadly, and that part of sc2mapster seems to be pretty dead sadly :/ Would love to learn how to create it though.
Anyway, you're completely right :)
0
@onlyleviathan: Go
It's my experience that using a repeat action creates less lag, than having a trigger like that. I've made a trigger that is run at the start of the map, which repeats forever. The repeat action has an if/then/else action, which checks if a Unit Variable is empty, if not, set a dialog item to the health pf the variable unit.
Then I have a 0.1 wait in the end of the repeat action.
This runs pretty smooth for me.
My map has a custom healthbar in the top corner like in the campain, thus the adjustment of size.
And if you really wan't to reduce lag, you can use this instead of Pick each player in as it creates less lag than calling a player group and so on.
EDIT: Attached a demo map.
0
@Kloupz: Go
What events exactly do you want to disable the use of the item (I assume you mean like give an error such as "Caster if full health")?
Try to explain it further, and we might be able to help. It's hard to help when I don't know what you want :)
0
@FunkyUserName: Go
Thank you!
I removed the Desc files in the UI folder, and it removed the error.
0
A Variable is like a box, the type of the variable is the shape of the box. So a Unit type variable can store unit types, an Integer variable can store integers and so on.
There are two types of variables, Global and Local. A Global variable is the ones that are created and listed among the triggers, and the local ones are the ones created in the individual triggers. A global variable can be called in all triggers, and a local can only be called in the one it has been made.
If you create a unit, you can set a Unit, Global variable to Last created unit and later on refer to that variable to refer to the unit.
Also Variables can have arrays (sub parts of the variable), which can look like this GlobalVariable1[0]. This allows you to set your Unit variable to UnitVariable[Owner of(Last Created Unit)] = Last Created Unit for each player, and then later be able to refer to the individual units for each player.
Arrays also have dimensions, so you can have a variable look like this GlobalVariable[0][0]. A way to look at it, is to imagine it as a checker board, or a coordinate system, so 0,0 is field, 0,1 another field with a different value, 1,0 a third value, and so on. I hope it makes sence, othervise I'll try to explain it further.