Page 1 of 1

Assign piece to a side when drawn

PostPosted: June 20th, 2019, 2:01 am
by plloyd1010
Is there a way to assign a piece to a side when that piece is drawn? I've tried the Restrict Access trait, leaving the sides list blank, and the "Also Belongs too.." and "Prevent non-owning..." boxes checked.

I have Side 1, Side 2 and Solitaire. Is there something in the algorithm that doesn't like spaces, or something like that? Some string handling thing? I am running out of ideas.

Peter

Re: Assign piece to a side when drawn

PostPosted: June 21st, 2019, 3:14 am
by plloyd1010
Is there perhaps a way to set a prototype in an equation? If so I may be able to solve the problem with a calculated property.

Re: Assign piece to a side when drawn

PostPosted: June 23rd, 2019, 7:50 pm
by kerkael
Did you try to use $PlayerSide$ as a variable in the Restrict Access List.
That would be weird, as each player would become the owner of the piece.
Instead, if you use a calculated expression or a random variable to define the owner from $PlayerSide$ once and for all, you fix it and make the piece belong to them only.

Re: Assign piece to a side when drawn

PostPosted: June 23rd, 2019, 9:19 pm
by plloyd1010
No, that never occurred to me. I'll give it a shot.

Re: Assign piece to a side when drawn

PostPosted: June 26th, 2019, 6:01 pm
by plloyd1010
I've tried working with the $PlayerSide$ variable. Here is where am. The trait list for an exemplary infantry platoon looks like this:
Infantry Platoon traits.png
Infantry Platoon traits.png (32.07 KiB) Viewed 793 times


The dynamic property to assign it to a side looks like this:
AssignedSide properties.png
AssignedSide properties.png (21.08 KiB) Viewed 793 times


That OwningSide prototype is just to trigger actions:
OwningSide Proto traits.png
OwningSide Proto traits.png (18.64 KiB) Viewed 793 times


to be continued...

Re: Assign piece to a side when drawn

PostPosted: June 26th, 2019, 6:04 pm
by plloyd1010
The trigger action trait for assigning a unit drawn to side 1 looks like this:
Trigger Action   - Assign to Side 1 properties.png
Trigger Action - Assign to Side 1 properties.png (17.06 KiB) Viewed 793 times


I don't seem to be getting the action to trigger. If it is the Side isn't being assigned. Does anyone have ideas as to why?