Jump to content

[SOLVED][Crowds] Accessing agentcliplength in CrowdTrigger Node?


bentraje

Recommended Posts

You're blurring the concept of scope. The variable float len is not an attribute, it's a local variable that falls out of scope when the wrangle terminates. Thus when you reference the attribute, it defaults to 0.

Try:

f@len = agentcliplength(0,0,"walk");

 

Edited by Atom
  • Like 1
Link to comment
Share on other sites

@Atom

Thanks for the response.
Nice catch on the f@len.

I revised the VEX with the len attribute but it still gives me a 0 value.
Are there any other areas I should look into?
My main concern would be the (0,0, "walk")
Considering that the crowd trigger does not have an upstream node. So maybe that's why its nofetching a value?

Link to comment
Share on other sites

Try passing the direct path instead of 0.

string handle_path = "op:/obj/geo1/dopnet1:crowdobject1/Geometry";
float len = agentcliplength(handle_path, @id, "walk");
f@attr_len = len;

 

Edited by Atom
  • Like 1
Link to comment
Share on other sites

  • bentraje changed the title to [SOLVED][Crowds] Accessing agentcliplength in CrowdTrigger Node?

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...