Jump to content

[HELP] EDF: Property-dependent visual representation


specahawk

Recommended Posts

This is a question regarding the resource "editor", particularly importing definitions

I have a custom element that consists of two markers. One cylinder and one arrow.

I want the height of the arrow to depend on a "number" type property of the element called "length"

(I want to denote a vertical line segment in the editor)

posZ works as long as it is not property dependent. So this works:

  
"Ship meshes"> 
    "fronthitv" friendlyname="Front hit vertical line" instructions="-"> 
        "position" type="coord3d" default="0,0,0" /> 
        "length" type="number" default="10" /> 
        type="cylinder" color="#0000ff" /> 
        type="arrow" posZ="3" color="#0000ff" /> 
    

  

I cannot get "position" work, regardless of whether or not it is property dependent.

  
"Ship meshes"> 
    "fronthitv" friendlyname="Front hit vertical line" instructions="-"> 
        "position" type="coord3d" default="0,0,0" /> 
        "length" type="number" default="10" /> 
        type="cylinder" color="#0000ff" /> 
        type="arrow" position="0,0,3" color="#0000ff" /> 
    

  

The code above does not change the position of the arrow at all. It is still coinciding with the cylinder.

What I want is something like this, but this doesn't work:

  
"Ship meshes"> 
    "fronthitv" friendlyname="Front hit vertical line" instructions="-"> 
        "position" type="coord3d" default="0,0,0" /> 
        "length" type="number" default="10" /> 
        type="cylinder" color="#0000ff" /> 
        type="arrow" posZ="!length!" color="#0000ff" /> 
    

  

The code above throws a bunch of errors.

I tried opening the source code of the editor (and it was beautifully written). Apparantly posX, posY and posZ are converted to a table called "position" before they are processed further.

I lightly searched the forums for any similar questions, but didn't find any.

How should I go about solving (or circumventing) this problem?

Please help me :)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...