RMMV Script Into Lunatic mode

Lu_

Veteran
Veteran
Joined
Sep 26, 2019
Messages
40
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
495
Reaction score
225
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,293
Reaction score
7,637
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
40
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
40
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,293
Reaction score
7,637
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
40
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
127
Reaction score
69
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 Posts

Latest Profile Posts

Evil7 added!


I did a bit of a remake on one of the maps, also I made a particle for jumping into the portal, and one for traveling through the portal. I'll probably add more sparkles later to embellish it. :LZSwink:
Polished the animation and added details :kaojoy:
Ami
What do you think about the Wood Bridge inside of Volcano?
Yet another gaming question, i'm currently playing Last of Us 2 and want to get another game to play next but can't decide between Ghost of Tsushima, Miles Morales & Jedi Fallen Order. After the latest mandalorian i AM on a star wars kick, but i also LOVED the last spiderman game that prequels Miles Morales. Ghost of Tsushima is the bottom of my list but i heard it was AWESOME. Just want a good story & fun gameplay.

Forum statistics

Threads
105,685
Messages
1,015,528
Members
137,362
Latest member
sdramose
Top