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
480
Reaction score
204
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,235
Reaction score
7,617
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,235
Reaction score
7,617
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
126
Reaction score
68
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: 2)

Latest Threads

Latest Posts

Latest Profile Posts

People1.png & SF_People1.png added!!!!

Adventurer:
"Why your body looks like a bird?"

Stranger:
"Because I'm harpy"

Adventurer:
"Clap along if you feel like a room without a roof"

*Both dancing to Pharrell Williams song*
Stream will be live shortly with a make-up session of the Interactive Text Adventure! Feel free to drop by!
Pootscooter wrote on Pharonix's profile.
Hey @Pharonix, just wondering what you're up to lately and if you've had an opportunity to check out the LTBS thread in the past few days...(a couple of us could really use your expertise). Hope you are well and Happy Thanksgiving!
Anyone know the best size image to put in signature?

Forum statistics

Threads
105,501
Messages
1,014,234
Members
137,163
Latest member
GhostPunishR
Top