Create account / Log in

Move Fixed Distance - Random

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Move Fixed Distance - Random

Postby kerkael » December 14th, 2017, 5:03 pm

Hi,

I'm trying to make a Piece move to fixed distance not that fixed after all.
I want to add +/-3 to the Distance to the right.
I'm trying to use a 1d7 result (dice with -4 added to the result), but the syntax is not accepted by what the Piece.
$1d7_result$ is not accepted, or is not moving.

What a I missing in the syntax ? and what with a 1000+$1d7_result$ giving me message about non numeric value in a numeric field ?

Thanks for help
kerkael
 
Posts: 44
Joined: December 1st, 2017, 3:03 pm

How to calculate a numeric field

Postby kerkael » January 26th, 2018, 4:14 pm

Hi, problem still not solved.
How can I calculate a coordinate to send a piece depending on a global property ?

- Bad Data in Module: BlackPiece [Send to Location - left_column_of_the_board] - Numeric field contains a non-number YLocation[2650-($BlackValue$*79)]=2650-(21*79)
It seems the global property BlackValue is correctly interpreted and replaced by 21 ... but it ends there. How to do the maths ?
kerkael
 
Posts: 44
Joined: December 1st, 2017, 3:03 pm

Re: Move Fixed Distance - Random

Postby kerkael » January 26th, 2018, 4:21 pm

GOTCHA !!!
Ok, the location fields and coordinates does not seem to accept anything but a numeric.
This means it won't calculate any formula !
So I created a calculated property as a new element in my piece, named it positionY, with expression : 2650-($BlackValue$*79)
Then used the name $positionY$ in the send to location Ylocation field.
I still think it's a bit heavy ... but it works.
kerkael
 
Posts: 44
Joined: December 1st, 2017, 3:03 pm


Return to Module Design

Who is online

Users browsing this forum: chrono280 and 2 guests