Ambiera ForumDiscussions, Help and Support. |
|
[ 1 2 3 4 5 ] Page 4 of 5 |
|
|||||
|
After some testing - it's fabulous by the way - one major improvement springs to mind, but may not be possible to implement... at the moment, there are 2 separate versions of the execute conditional actions - one for values and one for $variables - would it be possible for them both to be in the same script please? ie: assume variable is a value by default, unless called by a $ sigil eg: Condition 0: $v1 = $v2 Action 0 : play sound Else 0: Condition 1: v1 = 20 Action 1: update 2d overlay Else 1: I don't require to be able to mix-and-match values with variables (such as: Condition0: v1 = 1 | $v1 = $v2) If they specifically need to stay as separate scripts, that's fine - if they can be merged, that would be super! Thank you again. |
||||
|
I'll take a look at it and see what I can do. |
||||
|
Thank you Guest - you're a star. No problem at all if not possible. Another great thing I noticed about you conditional action executors is that it solves the age old problem of not being able to quickly alter the conditions, without having to scrap all the actions and start again - now, with your plugin, one can just add new conditions using the delimeter - leaving everything else untouched. This has turned the copper into gold. |
||||
|
I think I am going to need a bit more information about what you want exactly before I redo the code. Is the main problem that you don't want to use the sigil? I need some way to differentiate variables from strings. It's really the most elegant of the solutions out there, in my opinion. An alternative solution would be to use the sigil with strings instead. Variables would then be the default for strings without the sigil designation. Let me know what you think. |
||||
|
Hi Guest - no, the usage of the sigil is perfect. The problem is that I liked the first version that used conditional values too. The second version only allows for conditional $variables - so when I added the new one to my project, it replaced the old one and broke the conditional values I had set up. As a workaround, I simply renamed the second scrip,, so I could run the 2 scripts in the same project - one for conditional values, and one for conditional $variables. Both work perfectly well now. Hope this makes sense - ie: it would be perfect if the same script could handle values and $variables, rather than having 2 separate scripts. Thank you. |
||||
|
eg: If you run the latest script at the moment, it wont allow the following example: Condition 1: test = 1 Action 1: hide or unhide node ..but it will allow... Condition 1: if $test = $turtle Action 1: hide or unhide node |
||||
|
The latest script will return the value if it doesn't have a sigil before it. The sigil is used to denote a variable only. Your example will work if you do: Condition 1: $test = 1 Action 1: hide or unhide node Condition 1: if $test = $turtle Action 1: hide or unhide node Both should work. That's why I was confused when reading the code today. |
||||
|
Fun fact: 1 = $test will also work. |
||||
|
And to add one last note of insanity: blue = blue | red <> blue also works. |
||||
|
Oh, I see now! In that case, it's perfect, sorry for the cross-wired confusion there. Thanks for explaining. I'll remove the old version from itch and my project and update them with the new one. These 3 plugins have completely transformed my workflow. Can't thank you enough; they're insanely good for several reasons: simplicity of use and intuitive functionality. instant access to 100 entries, without having to open multiple windows. can nest infinite versions of the plugins (in parallel or in series) within itself. tab-bar is dragable/repositionable so you can see all info at once without it being truncated. saves screen real-estate (everything is in one place). scroll-position is stored (shows last-used entry when re-opened). can easily add extra conditions before actions, without having to delete everything first. can do far more complex variable conditions than with default visual non-code method. |
||||
|
I'm glad you like it, @VP. I need to include a bit in the code that will cause the looping of the conditions to break once it encounters an empty condition. This will boost its performance but will require you to keep your conditions without any gaps between them. This especially needs to be done if you plan to nest the action inside itself. Not doing this is quite wasteful of resources, so I think I will do it now. |
||||
|
And here's the link: https://files.catbox.moe/av3wg1.... I redid the loop so it is no longer nested and returns early. This will greatly improve its performance. Cheers. |
||||
|
Thanks for the improvements! Sorry to be a pain but I still don't really understand how to use the latest version for values - works fine for variables. In the first version I could do the following: Condition 0: enemyID = 1 Action 0: change texture This seemed to stop working in the newer versions. .... ...after a bit of thought before clicking submit/comment/post, I think it may not be working properly because I'm using arrays to define the values? Should it return the value of arrays, by calling it without the sigil? If not, then I'm more than happy to run the two versions of the script together - the older one for the array values and the newest one for the variables. Unless you can spot something I'm doing wrong of course. Thanks again - so sorry for stealing your time with this. |
||||
|
Are you using a JS array with this? I need a bit more information about what you are doing. The condition properties are of type string in this CC action, so it won't work with objects like arrays because I am doing no evaluations in the backend. This action won't work with anything JS related, because I made this CC friendly. Show me an example of the array you mention, and I will see what I can do about it. |
||||
|
Here's a version of the action that works with JS variables. https://files.catbox.moe/deqq6z.... I added another sigil for it, which is the symbol. When you use this sigil, it will tell the backend to evaluate the string using eval(). Say you have an Execute JS action with the following: var a = ["apples", "bears", "stairs"]; You would then check the condition in the action like so: a[0] = apples | b[1] = bears, etc. You can use the eval() sigil to run functions, but that's for bit more advanced use cases. Hopefully, this is what you meant. Gah... I forgot you can't use the hashtag symbol (new sigil) in this forum. Pretend you see them for me. |
[ 1 2 3 4 5 ] Page 4 of 5 |
|