how to control % as a variable?

557
2
Jump to solution
05-29-2023 08:49 AM
trungta
New Contributor

Hi everyone, I'm new to Cityengine, I'm trying to create my first ruler file and I'm wondering how to control a % value? Please see attached picture. Thank you for everyone.Screenshot 2023-05-29 223522.png

0 Kudos
1 Solution

Accepted Solutions
romainjanil
New Contributor III

//use the p() function probability for true in [0,1], instead of percentages

attr my_prob=0.5

base-->

case p(my_prob): X //true

else :Y  //false

View solution in original post

2 Replies
romainjanil
New Contributor III

//use the p() function probability for true in [0,1], instead of percentages

attr my_prob=0.5

base-->

case p(my_prob): X //true

else :Y  //false

trungta
New Contributor

Thank you very much, your solution has solved my problem