RMMV Script Into Lunatic mode

Lu_

Veteran
Veteran
Joined
Sep 26, 2019
Messages
41
Reaction score
14
First Language
German
Primarily Uses
RMMV
i used this codes as custom passive conditions for the yep auto passive states
Code:
<Custom Passive Condition>
if ($gameActors.actor(1).isStateAffected(1) && !$gameActors.actor(1).isStateAffected(16) && $gameSwitches.value(10) == true) {
  condition = true;
} else {
  condition = false;
}
</Custom Passive Condition>
Code:
<Custom Passive Condition>
if ($gameActors.actor(2).isStateAffected(1) && $gameSwitches.value(10) == true) {
  condition = true;
} else {
  condition = false;
}
</Custom Passive Condition>
but because i am using the $ prefix i get a lot of errors. is there a way to do the same with lunatic mode?
 

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
500
Reaction score
228
First Language
German
Primarily Uses
RMMV
Sry but i dont understand why using " $ " does any problem.. perhaps u need to use more "()" ?
examples:

1st Example
JavaScript:
<Custom Passive Condition>
if ( ($gameActors.actor(1).isStateAffected(1)) && (!$gameActors.actor(1).isStateAffected(16)) && ($gameSwitches.value(10) == true)) ) {
  condition = true;
} else {
  condition = false;
}
</Custom Passive Condition>

2nd example
JavaScript:
<Custom Passive Condition>
if ( ($gameActors.actor(2).isStateAffected(1)) && ($gameSwitches.value(10) == true) ) {
  condition = true;
} else {
  condition = false;
}
</Custom Passive Condition>
using more "()" helps to make sure that stuff like "!" only affects the code inside of the "()"..
(just incase that this made any problem.. like i said i am not sure what makes your errors)

Edit
i added both examples and left some room for start and end of the main "( )" to be better visible..
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,335
Reaction score
7,658
First Language
German
Primarily Uses
RMMV
i get a lot of errors.
it would hep to see a screenshot of the error messages, because not every error message has the same cause...
 

Lu_

Veteran
Veteran
Joined
Sep 26, 2019
Messages
41
Reaction score
14
First Language
German
Primarily Uses
RMMV
every state i am using stuff like this
Code:
$gameActors.actor(2).isStateAffected(1)
i get errors
 

Lu_

Veteran
Veteran
Joined
Sep 26, 2019
Messages
41
Reaction score
14
First Language
German
Primarily Uses
RMMV
it would hep to see a screenshot of the error messages, because not every error message has the same cause...
1.PNG
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,335
Reaction score
7,658
First Language
German
Primarily Uses
RMMV
"maximum stack size exceeded" has nothing to do with your code itself.
The most common cause is a plugin installed twice, the second most common is several plugins in the wrong order, then comes the possibility of two incompatible plugins and only on last probability in something like this is a truly recursive code.

please post a screenshot of your plugin manager with all plugins and their order listed, then we can check better.
 

Lu_

Veteran
Veteran
Joined
Sep 26, 2019
Messages
41
Reaction score
14
First Language
German
Primarily Uses
RMMV
"maximum stack size exceeded" has nothing to do with your code itself.
The most common cause is a plugin installed twice, the second most common is several plugins in the wrong order, then comes the possibility of two incompatible plugins and only on last probability in something like this is a truly recursive code.

please post a screenshot of your plugin manager with all plugins and their order listed, then we can check better.
2.PNG
 

Attachments

CHKNRAVE

Surprisingly not sponsored by Yanfly.
Veteran
Joined
May 11, 2020
Messages
130
Reaction score
72
First Language
French
Primarily Uses
RMMV
"maximum stack size exceeded" has nothing to do with your code itself.
The most common cause is a plugin installed twice, the second most common is several plugins in the wrong order, then comes the possibility of two incompatible plugins and only on last probability in something like this is a truly recursive code.

please post a screenshot of your plugin manager with all plugins and their order listed, then we can check better.
Plugin order list (for Yanfly's plugins) for reference: http://www.yanfly.moe/wiki/Category:Yanfly_Engine_Plugins#Plugin_List
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

grief... lol... I keep seeing request for MZ versions of MV plugins. this is why I haven't moved over and just MZ for my MV project.
Egg-sitting minigame is coming along nicely. Are you a bad enough dino to keep all these raptor eggs warm?

I forgot to post the animated version of the previous map I was working on. I'm still arguing with myself on if I like the stark blue ground better than the undergrowth ground used on the waterfall map. Hmm...
now that fmod is free for indie(<200k revenue), it would be interesting to see someone add fmod support for rpg maker
Can't say I can't promise progress on a project just yet. But I can say I had fun databasing tonight. :)

Forum statistics

Threads
105,800
Messages
1,016,564
Members
137,495
Latest member
Captain_ZZ
Top