bobbybob Posted February 17, 2022 Share Posted February 17, 2022 (edited) I have a node inside an asset. The asset has a parameter that references a camera. The node inside the asset needs the "resx" parameter value of the camera. I need to use the assets camera reference to get the "resx". I tried this: ch(chs("../cam")+"/resx") but I can't get it to work... How is this done correct? Edited February 17, 2022 by bobbybob Quote Link to comment Share on other sites More sharing options...
Fenolis Posted February 17, 2022 Share Posted February 17, 2022 ch(strcat(chs("../path_to_cam"),"/resx")) Using the strcat function to combine strings. get_outside_ref_value.hiplc 1 Quote Link to comment Share on other sites More sharing options...
bobbybob Posted February 17, 2022 Author Share Posted February 17, 2022 @Fenolis Thanks. Ahh I see. We need to use the absolute path to the camera from the first reference (asset) is it possible to use a relative path instead? /obj/cam1 -> ../../cam1 Quote Link to comment Share on other sites More sharing options...
Fenolis Posted February 18, 2022 Share Posted February 18, 2022 The reason a relative path didn't work with the expression is because when using the function chs("../path_to_cam"), if the path is relative, it doesn't account for the nesting depth difference between the parameter you are referencing and the parameter trying to pull the value. You can, of course, figure out the correct nesting depth of your parameter and concatenate the right number of "../" as a prefix to the path's string. In this situation I would recommend sticking with absolute path if possible. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.