The problem :
Give the user the ability to pick a sop from an otl to use as the basis of instancing.
Allow the user to also put expressions in the path
I was looking through the forum at various ways to solve this problem, and what came up most was the
evals(chsraw("../somenode..")) method.
now perhaps my implementation was wrong, but it seemed like I could not get this expression working if it was a straight string that pointed at a sop, but it worked if my otl level path was something like :
Worked :
"/obj/firehydrant_"+($PT%2+1)
Did Not Work :
/obj/firehydrant
I could get it working for either method but not both.
The Solution was to create a switch node and use the following expression in it :
if(opexist(chs("../regular_path/instancepath")), 1, 2)
I added an empty add node to it, as a trick to keep the switch from erroring out.
What the expression does is just look at the path and see if it can find the sop (is it a direct path) if it can't it assumes that the input is an expression and tries the 3rd input which evaluates the path with : evals(chsraw("../instanced_Geo"))
If I am doing this wrong, please let me know.
If this help then I am glad I shared it.
Cheers,
Ali