Jump to content

can I use increment in the name of an attribute or variable


Valent

Recommended Posts

fin case you mean VEX for loop, here is one:

float default = 0.0;
for (int i=0; i<10; i++){
    string name = "attrib" + itoa(i);
    addpointattrib(0, name, default);
}

of course you can directly use setpointattrib() which will create one if doesnt exist as well as sets values, but really depends on what you are trying to do

  • Like 2
Link to comment
Share on other sites

@Noobini I was looking for VEX solution but Thanks anyway, it is good to have a working example. 

@anim Thanks, that was exactly what I was looking for! so I was thinking in the right direction but messed up the syntax) (that defvalue[] in the 'adpointattrib' was quite confusing)

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