2023-04-21 06:32 AM - edited 2023-04-21 09:09 AM
Hi All,
I have an integer array of myvalue equals 1 or -1. For purpose this worked fine, but I was wanting to add hotspots to toggle these values. It is at this point that the rounding of AC messes things up. Given 2 values, you would think that it would swap between them around the median point, but instead the rounding ignores the range, then rounds up to the nearest allowed value. In this situation, this means that the flip from -1 to 1 occures at -0.5 rather than 0... Using range[-1,1] step 1, 2, instead of static values, has the same issue.
I have sort of gotten around this by changing to a length type array instead of integer and using the flag 1024, though this means I will need to use a dud array parameter for visual feed back or find some way to hide the display parameter.
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-04-21 08:46 AM
You can try using the parameter script to force myvalue to only be 1 or -1. hotspot should then snap from one to the other
in parameter script:
VALUES "myvalue" -1,1
2023-04-21 08:53 AM
That was how I defined myvalue to those numbers XD
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-04-21 08:55 AM
In your post you say you're using range, which allows for all values between -1 and 1.
2023-04-21 09:08 AM
Oh. That was just noting that I had also tried using range with step verse using static values to see if that would change the flip point... Sorry for the confusion.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2023-04-21 10:02 AM
I am not sure if this is of any help.
It is not for an array, but I am sure you can adapt it.
It is an on/off hotspot that uses a prescribed distance (can be what ever you want) for the stretchy part.
But it is linked to an on/off boolean parameter (that does the on/off bit) and also an "On/Off" text parameter that the user sees if they go into the object settings.
I think the text parameter is better for users to understand and it is also the value shown in the hotspot as you move it.
Barry.
2023-04-21 10:29 AM
Yeah, that is basically what I figured I would have to do. It just means I need to initiallise another dynamic array... Some other day...
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |