smbell Posted May 15, 2021 Share Posted May 15, 2021 (edited) I've got an embedded HDA where I'm trying to access the rotation values of an object outside the HDA. I have a string parameter for my object /obj/shot_6/sunlight on the HDA. If I use vrorigin("","/obj/shot_6/sunlight/")[0] as a test, it returns the x rotation value as expected. I can't figure out how to incorporate my HDA string chs("../../sunlight") into the expression so it evaluates correctly. I've tried things like vrorigin("","`chs("../../sunlight")`")[0] which actually resolves to vrorigin("","/obj/shot_6/sunlight")[0] when I middle click it, but that itself doesn't evaluate to the value. I thought maybe adding an eval() to it would work, but no dice. Hope this makes sense. Edit: I was able to work around it in vex with: matrix m = optransform(chs("../../sunlight")); matrix3 m_rot = matrix3(m); v@N *= m_rot; But it would still be nice to know how to work it in expressions. Edited May 15, 2021 by smbell Quote Link to comment Share on other sites More sharing options...
underscoreus Posted May 15, 2021 Share Posted May 15, 2021 (edited) Not very familiar with this function but could it be because you are missing a "/" at the end of the path when you use your chs expression? "/obj/shot_6/sunlight/" vs "/obj/shot_6/sunlight" If so it should be possible to either just say "`chs("../../sunlight")`"+"/" or by running strcat("`chs("../../sunlight")`","/") to add these two strings together. Edited May 15, 2021 by underscoreus 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.