(gargola) #1

man!!! the random sensor really sux! has anybody make a random script that really works?please share! LOL :smiley:

(Pooba) #2

What’s so bad about the random acuator? Just make one, go to int uniform and then set the seed value really high.

I’m not exactly sure how to sue the random sensor though.


(CubeFan973) #3

I’m seriously playing around with the random actuator! It rocks! Sure, all it does is make random properties, but I’m playing with stuff like making AI actually look like its’ choosing to do things. One idea:

For a deathmatch, who wants AI that always shoots you in the chest or head? Make it aim for other places like your torso or your leg!

They need to add the other two properties (strings and timers) and need something cooler, but it’s fine the way it is!

(gargola) #4

did i say ramdom actuator? i’m really sure i said SENSOR.SENSOR,controller and actuator.the random SENSOR is not any good,you make it a very high number and it’s supposed to make things random,but instead it makes things always.there is no diference between the always SENSOR and the random SENSOR.that’s why i’m asking if there is a script for random.i’m sure it will work right with a script. :wink: :smiley:

(Haunted-House) #5

Put this on the object:

from math import*

CON = GameLogic.getCurrentController()
us = CON.getOwner()

us.???? = int(GameLogic.getRandomFloat()* 100)

“???” is the name of whatever property you want to be random on that object. The number will be between 0-100
Was that what you wanted?

(gargola) #6

thanx Lagan,i’ll try it later and i will tell you if it worked. :smiley:

(gargola) #7

well…that was not what i was looking for.i don’t want blender to choose a random property.i want something like:

random(sensor)-------and------------add object,move left,send a message,go to another scene etc. etc.

in other words events to happen randomly. :smiley:

(Pooba) #8

you can use the random acuator to do this. Heres an example:


(gargola) #9

ugghhhh! all that trouble to make a random thing? then why is there a random SENSOR on blender?it could be easier if the random SENSOR works.after all,if it’s there is for something. :wink: :smiley:

ps: i’m not lazy,what bothers me is that the random SENSOR doesn’t work.anyway,thanx pooba :smiley:

(Pooba) #10

It’s not hard, that took me like a minute!