News Forums RAIN General Discussion and Troubleshooting Logic behind 'lastPOI = pointOfInterest' on 'PointsOfInterest'

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Sigil 1 month, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #39686

    Cheo
    Participant

    Hi all

    I’ve been following the examples on the RAIN Starter Kit: Basic Behaviors and I find them very interesting and useful.

    However, there is a small doubt I’ve got in an Action Expression for the Patrols/PointsOfInterests BT:

    lastPOI = pointOfInterest

    Why the need to add this expression? I know that if I remove the expression from the BT, the agent faces the first point of interest and no longer move, so, the expression must be created if the agent should resume the patrolling route. However, I don’t see lastPOI being used anywhere in the scenario and hence I don’t see the logic for the expression to be created in order for the agent to resume the patrolling route.

    Any idea?

    • This topic was modified 1 month, 2 weeks ago by  Cheo.
    • This topic was modified 1 month, 2 weeks ago by  Cheo.
    • This topic was modified 1 month, 2 weeks ago by  Cheo.
    #39738

    Sigil
    Keymaster

    Sorry about that, it’s kind of a display issue. If you look at the constraint closer it actually has more text in its expression field than can be displayed: pointOfInterest == null || lastPOI == pointOfInterest. Essentially it is telling the AI to continue patrolling if the detected point of interest is the same as the last.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.