Super wrote:Two things can you add asap?
1. Ability to set the value of one variable equal to the value of another, like set your current health equal to max health so that max health can be increased and be able to increase easily
2. Get rid of dotted outline over hotspots because I feel that's a bit eh Haha
Also, does quicksave work now because I'd like an easier way to save...
Oh! And variable types, can you sort them by groups? Cause I'll almost certainly have a shitload of variable sin this project...
Hi Super,
1. I'll add that in future versions. For now you can add 2 lines of code in game.js in
function setVar(variable, val, func) { (line 349 in WBA V2.5)
- Code: Select all
} else if (func.toLowerCase() === 'readvar') {
gameData.vars[idx].value = readVar(val);
The whole setVar function then becomes
- Code: Select all
function setVar(variable, val, func) {
var valueNum = parseInt(val, 10),
newVal,
idx,
i;
for (i = 0; i < gameData.vars.length; i += 1) {
if (gameData.vars[i].variable === variable) {
idx = i;
break;
}
}
if (!isSet(idx)) {
idx = gameData.vars.length;
gameData.vars.push({variable: variable, initial_value: 0, value: 0, type: ''});
}
if (!isNaN(valueNum)) {
val = valueNum;
}
if (!func || func === '=') {
gameData.vars[idx].value = val;
} else if (func === '+') {
gameData.vars[idx].value += val;
} else if (func === '-') {
gameData.vars[idx].value -= val;
} else if (func.toLowerCase() === 'readvar') {
gameData.vars[idx].value = readVar(val);
}
newVal = gameData.vars[idx].value;
if (isSet(events.varChange)) {
for (i = 0; i < events.varChange.length; i += 1) {
if (events.varChange[i][0] === variable) {
events.varChange[i][1](newVal, variable);
} else if (events.varChange[i][0] === '*') {
events.varChange[i][1](newVal, variable);
}
}
}
}
Then in WBA Build, configure as follows:
![Image](http://i.imgur.com/HcviPSu.png)
2. I think you mean the solid line when hovering, and the semi-transparent solid line on mobile devices. They are gone in V2.5.
In older versions you could add those two lines in custom.css:
- Code: Select all
body.touch .fakemap-area { border: none; }
.fakemap-area:hover { border: none; }
3. About the quicksave. It's a technical limitation of a webbrowser.
There are solutions, but these requires installation of a webserver with PHP/Python/.NET etc
I'm thinking about Python, which has a SimpleHTTPServer module, which does not require much setup
Ideas are welcome!
4. There are already variable types, but aside from assigning a type there is no 'grouping'.
Also there is limited restriction in naming variables, so you can use a variable format like groupname_variablename as the name of the variable.
If you desire other behavior, can you explain a little more what problems you face and what solutions you see?