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
493
Reaction score
223
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,283
Reaction score
7,635
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,283
Reaction score
7,635
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

being able to transition music seamlessly is amazing. my main character's theme has lyrics and it goes from vocal version to istrumental when he leaves his room. and vice versa. and thanks to a plugin, the transition is seamless. I love it.
All of the auditions for our game are so good, I'm so glad I'm not in charge of choosing completely. lol I just can't with some of them. I listen to them on repeat. XD
Working on a Patch to integrate AlphaABS into random generated Dungeons. Was a bit tricky, but the outcome is a real Life Changer!!

Will release it the next days!
Been pretty busy... but I got a better headset for recording and listening today. Dad says that he'll consider taking me to Great Wolf Lodge for the first time once I finish summer classes (my final semester!) I'll be taking my plushie friends with me: Bendy, Lolbit, and Helen Henny. (I WUV PLUSHIES!)
SF_Monster3,4 added!

Forum statistics

Threads
105,651
Messages
1,015,301
Members
137,327
Latest member
Mezzy
Top