Page 1 of 1

Generating randomness...

Posted: Sun Nov 10, 2002 1:01 am
by vorien
I'm sure it's been done, but...

I don't know if anyone has needed randomness, but you can do it using a blocked timer and a flag.

In one trigger, triggered by whatever event you choose,
Set the timer to a random value 10x your random decision tree, and make sure it's blocked. (I'm not sure what the preserve flag does.)

Create as many triggers as you have in your decision tree.
In each one, set a timer check for whatever range is appropriate (GT50, LT51, or use two conditions to narrow it to a range.)
Set a flag check.
Set the appropriate action.

My very first map has now been created. It has an actor, a 10 second delay, and then he randomly dies in various ways. Simple, but amusing. (It'd be interesting to know if you can bring a dead actor back to life, as well.)

Vorien

Posted: Sun Nov 10, 2002 5:16 am
by Jimmyjay86
In Quartz, I used a random speech trigger to switch between four different variants of a trader, each with a different inventory. Each time an off screen character randomly said one, two, three or four then a different trader exchanged a certain location.

The only way to have an actor brought back to life is to have clones off map and switch them with a trigger.