Why does noise() not work my expression?
3325
5
0
dansidi
Member
60 posts
Joined: Oct. 2010
Offline
Jan. 16, 2020 5:03 p.m.
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 - Jan. 16, 2020 17:06:14
Attachments:
Annotation 2020-01-16 215158.png (33.0 KB)
Annotation 2020-01-16 215841.png (17.6 KB)
tamte
Member
9384 posts
Joined: July 2007
Offline
Jan. 16, 2020 5:14 p.m.
Tomas Slancik CG Supervisor Framestore, NY
dansidi
Member
60 posts
Joined: Oct. 2010
Offline
Jan. 16, 2020 5:23 p.m.
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 - Jan. 16, 2020 17:23:53
ryuku
Member
171 posts
Joined: Oct. 2016
Offline
Jan. 17, 2020 10:18 a.m.
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
2164 posts
Joined: Sept. 2015
Offline
Jan. 17, 2020 10:52 a.m.
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 - Jan. 17, 2020 10:56:11
dansidi
Member
60 posts
Joined: Oct. 2010
Offline
Jan. 18, 2020 6:22 a.m.
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!