Greetings.
I want to make simple command that would change colour of target unit/building. I'm using hashtables to save values for each player, but I don't really know how to split a string by spaces, instead of splitting it by lenght, like 'substring' does.
The trigger is pretty simple(Check below). I want to make a command that sets values 3, 4 and 5 to chosen. Like -rgb X Y Z. I struggle here, cause every of those three variables can be both a one, two and three digit number.
I also would like to avoid JASS, for I don't know this language(Yet, if it's the only way, I'll try it).
PS: 6th value is implemented by -alpha command.
I want to make simple command that would change colour of target unit/building. I'm using hashtables to save values for each player, but I don't really know how to split a string by spaces, instead of splitting it by lenght, like 'substring' does.
The trigger is pretty simple(Check below). I want to make a command that sets values 3, 4 and 5 to chosen. Like -rgb X Y Z. I struggle here, cause every of those three variables can be both a one, two and three digit number.
I also would like to avoid JASS, for I don't know this language(Yet, if it's the only way, I'll try it).
PS: 6th value is implemented by -alpha command.
-
Colour Command Execute
-
Events
- Unit - A unit Is issued an order targeting an object
-
Conditions
-
And - All (Conditions) are true
-
Conditions
- (Unit-type of (Ordered unit)) Equal to ModDecoUnitType
- (Issued order) Equal to (Order(controlmagic))
-
Conditions
-
And - All (Conditions) are true
-
Actions
- Set RotatedUnit = (Target unit of issued order)
- Set RotatedUnitOwner = (Owner of RotatedUnit)
- Set RotatedUnitOwnerNumber = (Player number of RotatedUnitOwner)
- Animation - Change RotatedUnit's vertex coloring to ((Load 3 of RotatedUnitOwnerNumber from PlayerProperties)%, (Load 4 of RotatedUnitOwnerNumber from PlayerProperties)%, (Load 5 of RotatedUnitOwnerNumber from PlayerProperties)%) with (Load 6 of RotatedUnitOwnerNumber from PlayerProperties)% transparency
-
Events
Last edited: