Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
Feature Request: Ability to use values of variables in empty fields of built-in Actions and Behaviors.

wild-master
Registered User
Quote
2018-05-09 20:22:24

Warning:
If you'd hate doing this, don't worry about it. My other requests are far too important, and I don't want to shatter the goodwill toward me from Ambiera. I am asking for this in case I'm overestimating the difficulty of its implementation and it's actually almost effortless for you to add.


Look at this picture:
https://drive.google.com/file/d/...

Sample of usage:
Instead of adding "1, 0, 0", I would write "variable:speed", so it would use the value of a global variable named "speed" for that field, and the variable would contain the value "1, 0, 0". Currently, people can add that Action again based on the value of a variable, which is fine for small speed ranges, but pressing the Plus icon and adding that Action hundreds of times for large speed ranges will be unwieldy, so calling the variable within the Action means the Action would need to be created only once.

Easy example to portray why re-adding the built-in Action for every speed change is impractical:

Imagine that I have a speed range from one to one hundred. I would have to do this one hundred times:
If variable has a value, do something:
If 'speed' variable = 1,
Move by vector into facing direction: 1, 0, 0

If variable has a value, do something:
If 'speed' variable = 2,
Move by vector into facing direction: 2, 0, 0

If variable has a value, do something:
If 'speed' variable = 3,
Move by vector into facing direction: 3, 0, 0

+ 97 more times

I would have to do that one hundred times. Clicking the Plus icon to add that structure hundreds of times for my large speed ranges is inconvenient.

Reminder:
I know that CopperCube has a special variable named "movementspeed" for the A.I.'s motion. This feature would enable different situations.

Example of a spot where you already added this ability:
The built-in Action called "If a variable has a value, do something" has a drop-down menu called "ValueType" that has these options: "Value" and "Variable". Imagine that drop-down menu being used for all empty fields of built-in Actions and Behaviors!

Note of personal cruelty:
As far as I currently remember, I care about this being added only for the "Move by vector into facing direction" feature. If you're willing to do a one-time addition of this specifically for that Action but unwilling to redesign your whole project to add it to every Behavior and every Action, keep that in mind. All customers would find new great uses of this if you add it to every field. I am just admitting my own sinful reason for this request.

I looked into the source of CopperLicht and I attempted to copy the "Move by vector into facing direction" part of the code for hours and rebuild it as a custom Action, but that section was too difficult for me. I wanted to surprise the forum with a great script, but debugging a portion of code of that difficulty until it works might be like a monkey attempting to assemble furniture.


wild-master
Registered User
Quote
2018-05-11 18:55:11

WOOOOOOWWWW!!!!!!!!!

OOOOOOOOOOHHHHHH WOOOOOOOOOOOWWWWWW!!!!

I might've achieved it!

I might've recreated the "Move by vector into facing direction" feature as an extension, so I could customize the speed of my vehicles easily! I will test it thoroughly soon to check for flaws, but now I deserve a break. I will eat a delicious meal, and then I shall return to this and test it again.

I don't understand how Matrices work, but I played with the source code of CopperLicht for a virtuous amount of total hours over the past week, and my recreation seems to work so far. I said "seems" because I might learn that I am being overly excited too soon and I might be misinterpreting the results, and then I will feel quite sad. So sad, in fact, that I may jump into a fire.

I saved my extension on multiple hard drives, because the day I lose my CopperCube progress is the day that I will die.


tim12345
Guest
Quote
2018-05-12 03:02:25

just out of curiosity, i thought you solved this already a while back using javascript...the moving into facing direction... or maybe you are doing something more advanced now?


wild-master
Registered User
Quote
2018-05-12 03:42:25

I don't know the specific situation you're talking about, but I've mentioned problems with rotations multiple times, so my complaints might sound similar.


Now, I have realistic speed increases and decreases for my vehicles, and if Niko adds a "Look At" Action in CopperCube 6 that doesn't flip at the highest vertical point and lowest vertical point, I will use it with the "Move by vector into facing direction" feature.

For this thread, my first message describes the reason why using the "Move by vector into facing direction" feature is hard for large speed ranges, so I recreated that Action with JavaScript by studying the source code of CopperLicht. Having that feature in JavaScript allows me to easily adjust my speed in the "Vector" parameter by placing an external variable in that spot of the script. If I use the built-in Action, then I would need to press the "Plus" button to add every possible speed. Imagine pressing the "Plus" button hundreds of times to add that Action for every possible speed difference!

I'm glad that I achieved it because it can be removed from Ambiera's list to soothe their minds.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internation?l" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact