1
$\begingroup$

This one is self explanitory, I simply want a delay sensor to be a random number between 60 and 120.

Anybody know the solution?

$\endgroup$
1
$\begingroup$

You can use a python script to change the delay to a different random value each time it fires.

import bge
import random

cont = bge.logic.getCurrentController()

sens = cont.sensors['Delay']

sens.delay = random.randint(60,120)

Add the script to a text block in blender and connect a python controller to the delay sensor.

Game logic bricks setup

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.