Struggling with bbox expression

   3926   4   0
User Avatar
Member
5 posts
Joined: May 2019
Offline
I am trying to set the box in my scene to always be the same position as the top of the columns , on transform 2 I have this expression in the Translate Y attribute `bbox(“../supports”, D_YMAX)` but I am getting the error
`
Unable to evaluate expression (
Traceback (most recent call last):
File “”, line 1, in
NameError: name ‘bbox’ is not defined
(/obj/road_asset/transform2/ty)).
`

Attachments:
Capture.PNG (1.5 MB)

User Avatar
Member
2036 posts
Joined: Sept. 2015
Offline
Did you happen to copy and paste the expression from this forum?

Manually change the quotes by using your keyboard for those quotes.

Don't use those back ticks and have node set to HScript.
Edited by BabaJ - Sept. 20, 2019 11:17:16
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
hello,
as babaj said you don't need the backticks `` wrapping your expression for non-string parameters.

also check if by any chance you have set the language expression for that param to python, instead of hscript
Edited by Andr - Sept. 20, 2019 13:17:03
User Avatar
Member
5 posts
Joined: May 2019
Offline
So I've changed the language expresion to hscript but it's still not working

Attachments:
Capture.PNG (1.3 MB)

User Avatar
Member
5 posts
Joined: May 2019
Offline
Okay I deleted the node and added it again, everything is working now thanks guys!
  • Quick Links