Search code examples
anylogic

How to change the texture of rectangular node to another texture after a certain operation?


I am working on a model, where I need to change the texture of node to earth texture.

The initial texture is grass (See image). I tried using

enter image description here

node.setFillColor(sand);

But error pops up


Solution

  • You were almost right, but you need to start using code-complete for everything, this avoids you typing things AnyLogic does not understand.

    In your case, this will work: enter image description here

    Never type anything by yourself. Always use code-complete :)