Heya guys. Is it possible to be placing a unit, and to have the placement model react somehow to whether or not it's within a power field, beyond just "yes" and "no"?
Like if it needed to be placed within a certain number of power fields, could a text or image be attached to the cursor saying how many power fields it's in and how many it needs to be in while placing the unit?
As far as I can tell, it's not possible, because unit placement designates a model, not an actor.
Only thing i can think of doing this is creating a custom placement actor made through triggers then tracking mouse position and comparing power level at the mouse point then model swapping the actors model depending on the level.
You could then somehow make dialog to display images/labels maybe attached to a dummy unit that is moved to the mouse position all times.
There might be data solution but idk.
The placement model Model is the obvious field on the actor. However, this is passed to the PlacementModel Actor, which can handle regular events and such. This is how static defenses indicate their range around the cursor, the PlacementModel actor creates and hosts the range circle.
Keep in mind the placed "build ghost" is a separate actor called PlaceholderModel.
Whether either of these can interact with the active game board, such as validating power levels at the cursor position, I don't know, but Unit type scopes will probably fail.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Heya guys. Is it possible to be placing a unit, and to have the placement model react somehow to whether or not it's within a power field, beyond just "yes" and "no"?
Like if it needed to be placed within a certain number of power fields, could a text or image be attached to the cursor saying how many power fields it's in and how many it needs to be in while placing the unit?
As far as I can tell, it's not possible, because unit placement designates a model, not an actor.
I'm not sure about any of that, but are you aware that you can see power zones in the editor by going to view>show terrain>Show power.
Or are you talking about in game? I'm not 100% sure as to your question.
@Amaroq64:
Only thing i can think of doing this is creating a custom placement actor made through triggers then tracking mouse position and comparing power level at the mouse point then model swapping the actors model depending on the level.
You could then somehow make dialog to display images/labels maybe attached to a dummy unit that is moved to the mouse position all times.
There might be data solution but idk.
The placement model Model is the obvious field on the actor. However, this is passed to the PlacementModel Actor, which can handle regular events and such. This is how static defenses indicate their range around the cursor, the PlacementModel actor creates and hosts the range circle.
Keep in mind the placed "build ghost" is a separate actor called PlaceholderModel.
Whether either of these can interact with the active game board, such as validating power levels at the cursor position, I don't know, but Unit type scopes will probably fail.