Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
618
Reaction score
260
First Language
English
Primarily Uses
RMMV
If anyone was using this but not Yanfly's self switches and variables, I've modified it to support the built-in self switches (Yanfly support is not touched, at least theoretically - I haven't tested it). I can post it if anyone wants it.
 

dyoghenes

Veteran
Veteran
Joined
Jul 14, 2014
Messages
55
Reaction score
15
First Language
Hungarian
Primarily Uses
RMMZ
Hey! Could someone make this plugin compatible with MZ? I find this plugin to be the easiest to use.
 

DonatelloNerd

Villager
Member
Joined
Apr 1, 2020
Messages
5
Reaction score
0
First Language
German
Primarily Uses
RMMV
Hi, really great plugin u did there.
I wanted to show a choice only if a actor is in the party, otherwise hide it.
I tried it as it's shwon in the picture, but since I dont have a clue about Javascript, i couldnt figure out how to do it properly...
I know it's an old thread, hope u still read this :D.
Thx
 

Attachments

  • Screenshot 2021-06-13 093419.png
    Screenshot 2021-06-13 093419.png
    132.8 KB · Views: 8

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,751
Reaction score
894
First Language
English
Primarily Uses
RMMV
I wanted to show a choice only if a actor is in the party, otherwise hide it.
When you say "if thing," without referencing any kind of value or state, it's going to be true if that thing exists. So you're saying "if this actor exists," which it must if it's defined in your database, that's always going to be true.

Try: $gameParty.members().contains(a[X]) where X is the actor ID for each choice.
 

DonatelloNerd

Villager
Member
Joined
Apr 1, 2020
Messages
5
Reaction score
0
First Language
German
Primarily Uses
RMMV
When you say "if thing," without referencing any kind of value or state, it's going to be true if that thing exists. So you're saying "if this actor exists," which it must if it's defined in your database, that's always going to be true.

Try: $gameParty.members().contains(a[X]) where X is the actor ID for each choice.
Thank you so much, I have no Idea of code in general. I did what u proposed and it totally registers, but now it works only backwards. After some testing I got that u need to put "!" at the beginning to make it work like i wanted.

Thank u so much!
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,751
Reaction score
894
First Language
English
Primarily Uses
RMMV
After some testing I got that u need to put "!" at the beginning to make it work like i wanted.
Correct - gameParty.members() will say whether the actor is in the party. As described in the first post for this plugin, ! is the operator for NOT (which you already had in your code, so I didn't think I needed to say it again).

Glad you got it working!
 

xiamumomo

Veteran
Veteran
Joined
Sep 30, 2020
Messages
51
Reaction score
7
First Language
日语
Primarily Uses
RMMV
I don't know why, I set V[3] = game gold, option 1: I have money<<v[3] > 1000>>my initial 0 gold, when I get 1001 gold later, this option still shows, which means that there is no real-time change. I don't know if it's my problem or I remember that it won't happen when I test at noon. I'm worried now, and I don't know how to solve this problem
 

xiamumomo

Veteran
Veteran
Joined
Sep 30, 2020
Messages
51
Reaction score
7
First Language
日语
Primarily Uses
RMMV
Well, well, I was so stupid that I forgot to set up something
 

Latest Threads

Latest Profile Posts

Holy cow, I have made Row Formation work again with OTB!

Now, my devious machinations can finally be born...
finished the second chapter of deltarune today, I gotta say that the 3 years wait was worth it lol
Happy Friday, y'all! I just got home from work and am sitting down with a nice cider, and I'm ready to chill and enjoy myself. Not sure if I'm gonna dive into any of my game-related projects or not tonight.... we'll see how I feel after unwinding for a bit I guess!

Forum statistics

Threads
115,145
Messages
1,087,620
Members
149,671
Latest member
HSR
Top