Loki Fenrisulf IV
Member
Hello.
1 and 2- I am trying to make a script that stores the time of the pc itself in variables, both event and script ones. But I can't make it refresh as much as I want... if I start the cript with "begin" it refreshes at the start of every scene and only at the start of every scene, meaning I need to change to other scene to update it. If i start the script with "class Hora_PC" I can do it as I want, but for it I need to add the command "Hora_PC.update" inside the update method of every Scene class...
I also tried to make the method initialize of the script loop "update", but the game crashed for using too much memory (no message, just black screen, and couldn't close it until the windows said it wasn't answering).
1-Is there a way to make the script update in every scene without needing to add "Hora_PC.update" in the refresh of every scene script?
2-Is there a "delay" command in RGSS (for making the script stop for one or two frames and them let it keep going)? I may use it in the loop, but even if I get a good answer for question 1 it may still be useful.
3 and 4- I am also trying to make the enemies more random (meaning the same kind of enemy with different status when battling)... I tried adding to the lines of said stats in Game_Enemies "*(rand(500000)+750000)/1000000" (for a randomness of 25% both up and down),
but I soon noticed it changes the stats EVERY time, not only at the start of battle... I then thought about changing in the Battler scripts, but then would also affect the heroes...
3- Where do I change so I can get the effects I want?
4- Is there a command so I can trunc a value (turn a decimal value back to integer), so I can just use, for example, "maxhp=trunc($data_enemies[@enemy_id].maxhp*(rand(5.0)+7.5)/10.0)". I guess it may be better for the pc instead of the other one (I used so many zeros because of the possible number of... well, numbers... possible in the monster's stats like hp, since I wouldn't use decimals it needed to be a number that multiplied bu any hp number and then divided by a 10*(number of zeros +1) would make as many hp changes as possible)...
I already thank you for your future help, and sorry for any mistakes, I may be good at English, but no one is perfect in another language.
1 and 2- I am trying to make a script that stores the time of the pc itself in variables, both event and script ones. But I can't make it refresh as much as I want... if I start the cript with "begin" it refreshes at the start of every scene and only at the start of every scene, meaning I need to change to other scene to update it. If i start the script with "class Hora_PC" I can do it as I want, but for it I need to add the command "Hora_PC.update" inside the update method of every Scene class...
I also tried to make the method initialize of the script loop "update", but the game crashed for using too much memory (no message, just black screen, and couldn't close it until the windows said it wasn't answering).
1-Is there a way to make the script update in every scene without needing to add "Hora_PC.update" in the refresh of every scene script?
2-Is there a "delay" command in RGSS (for making the script stop for one or two frames and them let it keep going)? I may use it in the loop, but even if I get a good answer for question 1 it may still be useful.
3 and 4- I am also trying to make the enemies more random (meaning the same kind of enemy with different status when battling)... I tried adding to the lines of said stats in Game_Enemies "*(rand(500000)+750000)/1000000" (for a randomness of 25% both up and down),
but I soon noticed it changes the stats EVERY time, not only at the start of battle... I then thought about changing in the Battler scripts, but then would also affect the heroes...
3- Where do I change so I can get the effects I want?
4- Is there a command so I can trunc a value (turn a decimal value back to integer), so I can just use, for example, "maxhp=trunc($data_enemies[@enemy_id].maxhp*(rand(5.0)+7.5)/10.0)". I guess it may be better for the pc instead of the other one (I used so many zeros because of the possible number of... well, numbers... possible in the monster's stats like hp, since I wouldn't use decimals it needed to be a number that multiplied bu any hp number and then divided by a 10*(number of zeros +1) would make as many hp changes as possible)...
I already thank you for your future help, and sorry for any mistakes, I may be good at English, but no one is perfect in another language.