Page 1 of 1
How to randomize a float value in the DECORATE parser?
Posted: Wed Oct 19, 2011 4:52 am
by Nash
Code: Select all
TNT1 A 0 A_FadeTo(random(0.25, 1.0), 1.0, false)
What I'm trying to do here is to give the actor a random opacity at spawn. However, this doesn't work - what happens is the actor is either invisible, or visible at spawn. I'm guessing that it's not randomizing the value in the way I think it should have.
Is this even possible?
Re: How to randomize a float value in the DECORATE parser?
Posted: Wed Oct 19, 2011 6:21 am
by Blue Shadow
For float points use frandom.
Re: How to randomize a float value in the DECORATE parser?
Posted: Wed Oct 19, 2011 6:51 am
by Nash
Thanks! :D