Why does noise() not work my expression?
2380
5
0
dansidi
Member
59 posts
Joined: 10月 2010
Offline
2020年1月16日 17:03
I am trying to add some variation to particle birth rate and I thought I could use the noise() function in an expression (see screen grab)
but alas, an error results:
Unable to evaluate expression (Invalid number of arguments for function (/obj/particle_emitter/dopnet1/popsource1/constantrate)). The Help page on the noise() function clearly says that you can use the form
float noise(pos) I can use rand() or sin() without an error. Why can I not use the noise() function?
Many thanks
Edited by dansidi - 2020年1月16日 17:06:14
Attachments:
Annotation 2020-01-16 215158.png (33.0 KB)
Annotation 2020-01-16 215841.png (17.6 KB)
tamte
Member
8647 posts
Joined: 7月 2007
Offline
2020年1月16日 17:14
Tomas Slancik FX Supervisor Method Studios, NY
dansidi
Member
59 posts
Joined: 10月 2010
Offline
2020年1月16日 17:23
Hmm. thanks, Tomas I tried that one but it only returns 0.0, whatever I put in the parentheses noise($FF, $FF, $FF) = 0.0 noise($FF, 0.0, 0.0) = 0.0 noise($FF, $FF+100, $FF+1000) = 0.0 noise($FF, 123, 456) = 0.0 Dunno what's going on with noise()
Edited by dansidi - 2020年1月16日 17:23:53
RyuKu
Member
171 posts
Joined: 10月 2016
Offline
2020年1月17日 10:18
strangely that corresponded python function does work if to do it somehow so
hou . hmath . noise1d ( hou . Vector3 ( 0.00 , 0.00 , 0.00 )) * 100
BabaJ
Member
2048 posts
Joined: 9月 2015
Online
2020年1月17日 10:52
Yeah seems to be a bug as noise() will only work if at least one of the arguments is an explicit float value. The remaining then can be $FF. but I can get a result using $FF(for all three arguments) with snoise().
Edited by BabaJ - 2020年1月17日 10:56:11
dansidi
Member
59 posts
Joined: 10月 2010
Offline
2020年1月18日 6:22
I gave up with noise() and found snoise() which did seem to work OK.
I can't believe this is a bug that has somehow slipped through.
Surely people are using it all the time but I'm just doing it wrong.
(That's usually what's happening…)
Thanks for your input though!