This topic contains 3 replies, has 3 voices, and was last updated by  Shimakaze 2 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #40399

    baneand
    Participant

    Hi, I was wandering if I can make the random node return unique result - different than the last one. I have simple navigation targets and I want my character to choose different navigation target than the previously chosen. Is that possible?

    Thanks

    #40412

    blockcipher
    Participant

    Well, the “weight” of the node will (I believe) determine the probability of being chosen by the Random node. So you could have a variable update the weight of the child nodes. So if random chose 2 out of 4 first, you could set the weight of 2 to zero or close to zero to ensure it wouldnt be picked again. Does that make sense?

    #40416

    baneand
    Participant

    Hm ok I will try it that way. I wanted to know if I can make my own random node, to extend the existing one, but I cannot seem to find an example.

    #40424

    Shimakaze
    Participant

    Yes, you can extend RAINDecision to your own randomed-node.
    However, it will not have weight field in child nodes because editor encapsulation.
    Inheriting built-in random is useless, too.

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

You must be logged in to reply to this topic.