When agent enters in block the Object (rectangle) changes color instantly. What I want is when agent enters in block object (rectangle) it should take 1 or 2 seconds to change its color.
My Approach
temperature = true
temperature = false
temperature == true ? red: brown
Use a Dynamic Event, name it myDE
. Give it 1 argument myAgent
of type YourAgentType. In the action code, you write myAgent.myRectangle.setFillColor(yourColor);
In the "on enter" code of the delay block, you create the event using create_myDE(2, SECOND, agent)
Now every agent arriving in the delay will schedule an event 2 sec after entering that will change that agent's rectangle.