Jump to content

point expression not working for active points in simulation


Tyfx567

Recommended Posts

I have replaced the file with just a cube so you guys can still see what is going on. 
It's very basic. It's just a box with points at the center of each piece telling what is active and what is not active. however when I put this expression: 

point("/obj/Angel/AC", groupbyvals("/obj/Angel/AC", D_POINT, "name", $OBJNAME), "ACTIVE", 0) 

in the active value DOP that I got from another dude on a forum on here, that expression doesn't work. Can someone please tell me what I am doing wrong here? 
This is for a demo reel project so I am on a time crunch..that's why I'm posting this. 
Thanks so much!! icon_lol.gif
 

Angel_Destruction_3.hip

Edited by Tyfx567
Link to comment
Share on other sites

  • 5 months later...

groupbyvals() returns a string. The point expression expects an integer (though a float will work).

You need to convert the string returned by groupbyvals() to a number. hscirpt has the atof() expression which converts a string to float.

 

try:

point("/obj/Angel/AC", atof(groupbyvals("/obj/Angel/AC", D_POINT, "name", $OBJNAME)), "ACTIVE", 0)

Link to comment
Share on other sites

  • 1 year later...

Hey Wen, actually, this post is extremely old and I figured out how to do it much more efficiently since then. I made a sample file for you to learn from. I've learned a whole lot since then and it makes me feel stupid that I did it the hard way. 

Notice that I have "overwrite attributes from sop" checked on in dops in the packed object. 
Watch the "bullet masterclass" show to learn more techniques. 

Also watch "wrangle workshop" on vimeo if you don't know vex. 

If you need help don't hesitate to ask. I enjoy helping others when I know things :D

Active_showing.hip

Edited by Tyfx567
Link to comment
Share on other sites

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...