Author Topic: Bot - Random Pathways  (Read 559 times)

I've asked a couple of times on servers including my own in the past how to get the VCE random events working, but I keep forgetting it D:

So, how would you go about making a bot (amade's bot events) walk along a path, then when it reaches a junction in the path split off one of 3 ways and continue walking along another path via a few named locations and the goto thingy?

ModVar brick set 1
ModVar brick randNum 3
If 1 -> Go Right
If 2 -> Go Forward
If 3 -> Go Left

If you need me to go into more detail, I can. I prefer to give hints and see if people can follow along. They learn much quicker that way.

Ah, just going to see if that works.

Ok, what I did obviously didn't work:

0 OnBotTouch > Self > VCE_Variable > Brick > [Direction] > Set 1
1 OnBotTouch > Self > VCE_Variable > Brick > [Direction] > Random 3
2 OnBotTouch > Self > VCE_IfVariable [Direction] == 1 [5 5]
3 OnBotTouch > Self > VCE_IfVariable [Direction] == 2 [6 6]
4 OnBotTouch > Self > VCE_IfVariable [Direction] == 3 [7 7]
5 OnVariableTrue > Self > SetBotMovement > GoToBrick
6 OnVariableTrue > Self > SetBotMovement > GoToBrick [Forward]
7 OnVariableTrue > Self > SetBotMovement > GoToBrick

Triple post...damn help for no edit:

5 should end with
and 7 with

Ah, I see why. You're trying to set the crossroads brick's bot movement.

You would have to have them toggle different onBotTouch events to go to different directions.

This is what I came up for a crossroad brick to go between three bricks.


Last line was just to help me test if it worked. Little jittering because the bot touches the brick multiple times. Could be easily fixed with a zone or by setting the brick collision off for a few seconds.

Just worked out from that why mine didn't work. It was trying to trigger all the movements at once. seems events 12+13 solve that.

Thanks =D