Author Topic: Eventing help: Repeating events and delays  (Read 641 times)

Hello, I have been having a little trouble lately with eventing the hole bots to do what I want them to do. I have tried to get the bot to do the anim_talk gesture every about 10 seconds after he spawns, but I cannot figure out how to make this gesture repeat itself every 10 or 15 seconds. Here's a little breakdown of what I have tried.

  • OnBotSpawn > Bot > PlayGesture > anim_talk
  • [1000] OnBotSpawn > Bot > PlayGesture > root

    That's all fine and good, but I was hoping I could make it so that it will repeat this event every, let's say, 15 or 20 seconds, so it would play the gesture on its own forever, instead of just once upon spawning.

    Any help would be greatly appreciated, thank you.





You could add a onrelay that fires the same bricks relay again, which'd result in any other onrelay events being constantly repeated
It'd look like this (should be right, on mobile atm though so i can't confirm this atm)
OnBotSpawn > Self > fireRelay
OnRelay > Bot > PlayGesture (gesture to play)
(Some delay time) OnRelay > Bot > PlayGesture > root
(Delay time here after previous time to loop again) OnRelay > Self > fireRelay

[0]onbotspawn>self>seteventsenabled[1 2 3 4][on]
[0]onbottouch>bot>playgesture[talk]
[1000]onbottouch>bot>playgesture[root]
[0]onbottouch>self>seteventsenabled[1 2 3 4][off]
[10000]onbottouch>self>seteventsenabled[1 2 3 4][on]

something like that should do it
the onbotspawn is to fix it when reloading the bricks or rejoining the server

Both of your solutions worked like a charm! Thanks for taking the time to sort out my little problem :).

Thanks again, locking.