I'm aware that it's possible to set a unit's scale, but is there no way to get it? I've searched the entire wiki but I can't find any function that allows me to do this :(
I need to retrieve it as a fixed value to perform some math.
Please note that I do not consider the unit property changes trigger's do not take unit scale as a parameter.. I'm thinking it's somehow model or actor related but I can't seem to find the answer..
If you are setting the unit's scale via actor messages or the actor events page in the data editor you can set a Status value to each of the scale parameters. Then you can use the Status Increment function in the trigger editor to return the Status values.
I'm scaling a unit by a factor of 0.65 according to iterations. Once the unit grows to a size where it collides with another object, another trigger is supposed to catch it, retrieve the scale and convert it to the distance between the objects. So if the scale is 6.5, that would mean the distance is roughly 10 units before the unit was detected.
Thus, the trigger you suggested wouldn't work, as it requires an immediate check after the scale is changed. The situation is basically that I have no idea when the collision is going to happen. So I need to be able to retrieve the scale dynamically.
To make it easier to understand, imagine this as an ultrasonic sensor. The growing unit is an "echo". Once the "echo" hits a target, the distance is calculated.
(This is actually a dumbed down description of what I'm playing with. There is no novelty in it, I'm simply just playing with the editor's functions.)
@BasharTeg
Yea, I'm using actor messages. How exactly would I set a status value to each of the scale parameters? I don't use data much so I'm not so familiar with it. Is what you are describing in any way similar to storing the scale in an unused data variable via catalogs?
Yea, I'm using actor messages. How exactly would I set a status value to each of the scale parameters? I don't use data much so I'm not so familiar with it. Is what you are describing in any way similar to storing the scale in an unused data variable via catalogs?
afaik you have to set them as constants - i.e., no arithmetic. When you set a Status element you can set the name of the element much like you can do with timers. So if, for example, you want to set the unit's scale to 200%, you would set a Status named ScaleX to 200, another one named ScaleY to 200, and a third named ScaleZ to 200. It's basically the same as storing the scale change in three variables, only using data rather than triggers. In your situation I'm not sure whether this will benefit you but perhaps it will help you find a plausible solution.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm aware that it's possible to set a unit's scale, but is there no way to get it? I've searched the entire wiki but I can't find any function that allows me to do this :(
I need to retrieve it as a fixed value to perform some math.
Please note that I do not consider the unit property changes trigger's do not take unit scale as a parameter.. I'm thinking it's somehow model or actor related but I can't seem to find the answer..
Strange that there isn't a function that would retrieve the scale values..
Would something like this work?
If you are setting the unit's scale via actor messages or the actor events page in the data editor you can set a Status value to each of the scale parameters. Then you can use the Status Increment function in the trigger editor to return the Status values.
@desiderius
I'm scaling a unit by a factor of 0.65 according to iterations. Once the unit grows to a size where it collides with another object, another trigger is supposed to catch it, retrieve the scale and convert it to the distance between the objects. So if the scale is 6.5, that would mean the distance is roughly 10 units before the unit was detected.
Thus, the trigger you suggested wouldn't work, as it requires an immediate check after the scale is changed. The situation is basically that I have no idea when the collision is going to happen. So I need to be able to retrieve the scale dynamically.
To make it easier to understand, imagine this as an ultrasonic sensor. The growing unit is an "echo". Once the "echo" hits a target, the distance is calculated.
(This is actually a dumbed down description of what I'm playing with. There is no novelty in it, I'm simply just playing with the editor's functions.)
@BasharTeg
Yea, I'm using actor messages. How exactly would I set a status value to each of the scale parameters? I don't use data much so I'm not so familiar with it. Is what you are describing in any way similar to storing the scale in an unused data variable via catalogs?
afaik you have to set them as constants - i.e., no arithmetic. When you set a Status element you can set the name of the element much like you can do with timers. So if, for example, you want to set the unit's scale to 200%, you would set a Status named ScaleX to 200, another one named ScaleY to 200, and a third named ScaleZ to 200. It's basically the same as storing the scale change in three variables, only using data rather than triggers. In your situation I'm not sure whether this will benefit you but perhaps it will help you find a plausible solution.