Terrain colors in SLNOVA

21 views
Skip to first unread message

CristiánRizzi

unread,
Jun 13, 2016, 1:03:19 PM6/13/16
to StarLogo TNG
Hi,
Is it possible to identify a terrain color with a number so I can use it within a conditional structure like "If.... then..."?

For example, if I set the terrain color with different shades of green (using "Stamp Grid" and R:0 G:[20+random 82] B:0), how can I identify the resultant terrain color and use it within a conditional statement?
I want my agents to do something based on the different shades (e.g. gaining different units of energy when the green shade is darker).
Thanks!

CristiánRizzi

unread,
Jun 13, 2016, 2:48:56 PM6/13/16
to StarLogo TNG
Found it!!
I can compare the RGB value with the terrain color when two of the RGB are zero (e.g. R:0, B:0) so the value of the color terrain is the value of the G.
Reply all
Reply to author
Forward
0 new messages