Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Is it possible to save Copper Cube variable with scripting?

dekon_17
Registered User
Quote
2022-08-19 21:12:31

Customizable controls are cool. What isn't cool, however, is saving those controls. Thing is, while I can save them with a "Load or Store variable" action, this takes a lot to do this, since I need to create a lot of these actions. For example, I have 12 control variables, plus 2 for sound volume and sensitivity, which means 14 actions that I need to set up. And while this isn't really a huge problem, it gets worse because I made it possible to bind some controls to mouse wheel move. That means that I also need to store the variables of required mouse wheel delta for controls that need it (which makes it total of a 26 variables to possibly save).

So, my question is, can I save controls by using some magical JavaScript stuff? I couldn't find a Copper Cube command that would allow to do this, and doing this with scripting, in my opinion, is much easier than setting up these actions (and, if I'll have some mistakes, suffering to find them in all of these 26 actions).


VP
Guest
Quote
2022-08-19 22:00:38

You could use Joy2Key or xpadder or autohotkey and then save the profiles with the gamename so each time the game starts, it loads the controller profiles. Nothing to do with coppercube, just quick and easy 3rd-party solutions. You can then distribute the controller profiles with your game.exe setup.


dekon_17
Registered User
Quote
2022-08-20 07:23:14

Using third-party software? I don't know, I want to make it as it would be in a normal game, where the controls customization (if presented) is built in the game itself. This is much better than having a side program that you need to use in order to change something within the game.


sven
Registered User
Quote
2022-08-20 11:51:52

you can store settings in a file.. readfile and writefile is a function to use. i have done it alot and dont see any problems with it.


dekon_17
Registered User
Quote
2022-08-20 19:56:54

Well, I might try to use this method. I mean, it's not the best option to use, but since I already decided to use external text files for localisation, I might use this for controls as well.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internationa?" (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