Randomize and Alpha Questions

  • Thread starter Thread starter Glorified_G
  • Start date Start date
G

Glorified_G

Guest
Hey Everyone,

I'm fairly new to editing content for HL2 and have ran into a few problems that I can't seem to find any insight on. I've extensive searches on multiple forums, reading the wikis, "googling" different terms, etc. but can't seem to find any helpful information.

My first problem/question:

I have an animated texture mixed with some sine effects. Everything is working out as planned but now I want to randomize the animation. According to the wiki I should use the RandomEntity proxy...but when I try that nothing happens. I obviously must be doing something wrong or missing a step. Would this be correct, or am I missing something?

{
"RandomEntity"
"resultVar" "$frame" [0-7]
"scale" 10
}

I think my problem lies in the resultVar area (i could be wrong on that though) could anyone help me with that?



My second problem, kind of related to the first situation, is that I would like to have multiple effects happen to the same result variable. So, for example, if I want an image to fade in and out based on a sine using "$alpha" but I also want a uniform noise effect using the same "$alpha"...is that possible? Can you alter the alpha twice? I've been toying with this but only end up having a messed up blinking effect...

Cheers guys, thanks for reading and extra thanks to anyone with some insight.


-G

(sorry to the mods if this is posted in the wrong place.)
 
I seem to be having this problem too. I looked in the console to see if any errors came up, and this is what I found:
console said:
Error: Material "4lt/crate_randrot" : proxy "RandomEntity" not found!

Yay valve...

I tried using UniformNoise instead, but that keeps recalculating the value, so my material ended up giving me a headache. :laugh:

My only guess at a solution is to use CurrentTime somehow (most random number generators use the time as a seed.) The only problem I could see with that, is that if the calculations are made too fast, the same number will be returned each time. Also, idk if that's in minutes, seconds, milliseconds, microseconds, nanoseconds, picoseconds, or what.




BTW, idk how old this post is, i just found it with google looking for a solution to the problem.
 
Back
Top