Create account / Log in

Assign piece to a side when drawn

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Assign piece to a side when drawn

Postby plloyd1010 » June 20th, 2019, 2:01 am

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
User avatar
plloyd1010
 
Posts: 23
Joined: October 17th, 2013, 4:25 pm

Re: Assign piece to a side when drawn

Postby plloyd1010 » June 21st, 2019, 3:14 am

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.
User avatar
plloyd1010
 
Posts: 23
Joined: October 17th, 2013, 4:25 pm

Re: Assign piece to a side when drawn

Postby kerkael » June 23rd, 2019, 7:50 pm

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.
kerkael
 
Posts: 111
Joined: December 1st, 2017, 3:03 pm

Re: Assign piece to a side when drawn

Postby plloyd1010 » June 23rd, 2019, 9:19 pm

No, that never occurred to me. I'll give it a shot.
User avatar
plloyd1010
 
Posts: 23
Joined: October 17th, 2013, 4:25 pm

Re: Assign piece to a side when drawn

Postby plloyd1010 » June 26th, 2019, 6:01 pm

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 1816 times


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


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


to be continued...
User avatar
plloyd1010
 
Posts: 23
Joined: October 17th, 2013, 4:25 pm

Re: Assign piece to a side when drawn

Postby plloyd1010 » June 26th, 2019, 6:04 pm

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 1816 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?
User avatar
plloyd1010
 
Posts: 23
Joined: October 17th, 2013, 4:25 pm


Return to Module Design

Who is online

Users browsing this forum: No registered users and 1 guest