Check your events. What is happening is that you have the event that creates the achievements getting run each time you start a new game thus it recreates the achievements. Possibly an easy solution is to create a global switch achievement for starting a game once with the event having a...
Haven't tested this but put this in a .js (for example myTest.js) file activate it in your plugins then try a new game.
(function($){
var Scene_Base_checkGameOver = $.prototype.checkGameover;
$.prototype.checkGameover = function() {
DataManager.saveAchievesWithoutRescue(21)...
okay in that case try this:
DataManager.saveAchievesWithoutRescue(21)
Need to call this at various times to save achievement data (like before game ends when dying for example) would probably also work well when changing maps.
Plugin command method:
SarleccAchievementsVariable global name description gameVariableID limit reward
SarleccAchievementsVariable 1 Deaths Die.100.times 5 100 3
Strangely I must have forgot to program in the icon and bool values for plugin commands.
SAR.achievements.achievementVariable(global...
True, though the cost of the server was hurting my wallet to much. (Along with other unexpected real life costs I unfortunately had to cut it). :( Thanks very much for your interest in it though. :)
Note though that if your variable got set to something other than an array your if statement will fail.
This can be avoided by using typeof:
if ( typeof $gameVariables.value(15) !== 'Array' ) {
$gameVariables.setValue(15, []);
} else {
$gameVariables.value(15).push(...
I believe the equivalent for what you have is a for...in loop, in JavaScript for...in loops are not recommended for arrays (they are useful for objects though).
//Here is a JavaScript version using a normal for loop
//Assuming itemArray and newArray are already defined variables
for (var i = 0...
I have successfully done it with PHP/SQL through AJAX which is a JavaScript library. I have also done it with Node.js/Socket.io/MongoDB. Which in some respects is easier as you only have to deal with one language instead of three. Either way though, you have to have knowledge on setting up a...
Actually by using the double ='s it was evaluated as being either true or false. So:
1 == 1 // this equals true
1 == 0 // this equals false
Currently I am too tired to be of much further help at the moment sorry. :LZYdizzy:
Yep! :)
Also was looking further in the docs and there is yet another method that could be used to do this (which is also extremely easy to read):
#fills the entire array with the value
$game_variables[id].fill(value)
#note* though that this is an overwrite not an increment
#meaning that if...
Generally yes, however in certain cases I feel it is unneeded (for example only saving me a few characters of typing) :).
For example the code I posted could also be done this way:
class Game_Variables
def incArrayAll (variableId, i = 1)
@data[variableId].map! {|x| x + i}
end
end
However...
@dbchest I disagree with that approach for this particular issue. What he wants is to store an array in the $game_variables array and change only that array (not the entire $game_variables array). Also note that this question was for Ruby not JavaScript.
In your edit you are creating an array with the first element set to 0. You then proceed to push 29 1s into the array (the first element is still 0). You could fix that problem by using an empty array and then starting the loop from 0 instead of 1. Here's another way of doing it:
# Create an...
Hey,
Sorry for the late reply went camping.
Anyway the issue was my use of single quotation marks.
What happens is it is trying to look for another single quotation mark to finish line2: 'I don't move much'. Since it doesn't find one it results in an error which will keep the plugin off making...
Slowly but surely the game dev streams accomplish the goal.... actually finishing the game.
Going to start in about 15 minutes or so for anybody interested. And of course you know you are, well at least you know now because it's been stated that you are, and obviously anything randomly stated on the Internet must be true right?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.