Another Galv's map projectile predicament

deveras111

Veteran
Veteran
Joined
Dec 29, 2018
Messages
39
Reaction score
5
First Language
English
Primarily Uses
RMMV
Hey guys, so I'm having a little bit of trouble with this plugin again. What I'm trying to accomplish is basically a game where the player goes around a dungeon, lighting individual torches and different light sources using fire projectiles. Everything was going fine except now for some reason, every time I light one torch, all other torches in the room become lit. This kind of defeats the purpose of the game since the plan is I would require the player to work out puzzles in which torches are lit and to be mindful of how many projectiles they have in their arsenal and which torches they light.

The way I have it set up right now, every time I shoot a projectile and it hits a torch, it increases a variable value by one, thereby switching the torches to their second event page with contains an animation for them being lit, and a sound effect. I've done this by attaching the projectile script to a common event that increases a variable value. All the other torches have an identical set up.

Screen Shot 2019-04-09 at 5.22.00 PM.png Screen Shot 2019-04-09 at 5.21.52 PM.png Screen Shot 2019-04-09 at 5.21.36 PM.png Screen Shot 2019-04-09 at 5.21.52 PM.png Screen Shot 2019-04-09 at 5.21.36 PM.png

I have no idea why it's doing this at all. From what I see I have my set up pretty similar to that of Galv's in his demo of the Plugin. Admittedly it is a bit different considering I'm trying to accomplish a different goal, but for the most part, it seems pretty similar to me. Maybe I'm missing a script somewhere?

Here is a link to the plugin:https://galvs-scripts.com/2016/09/13/mv-map-projectiles/

If there are any tutorials on this plugin please let me know, I've looked everywhere.
 
Last edited:

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
444
Reaction score
208
First Language
English
Primarily Uses
RMMV
At first glance, if the variable is used as the conditional to show the lit torch, and lighting the torch adds +1 to the variable, all the torches will appear lit because they all check the same variable. You need to have a separation of some kind to ensure that the other torches don't light up.

What I would do is use a self switch on each torch that activates when that torch is lit. The variable can still be used, but don't make that a condition to show a lit torch. Regular switches will also work, but a different switch will be required for each torch.
 

deveras111

Veteran
Veteran
Joined
Dec 29, 2018
Messages
39
Reaction score
5
First Language
English
Primarily Uses
RMMV
At first glance, if the variable is used as the conditional to show the lit torch, and lighting the torch adds +1 to the variable, all the torches will appear lit because they all check the same variable. You need to have a separation of some kind to ensure that the other torches don't light up.

What I would do is use a self switch on each torch that activates when that torch is lit. The variable can still be used, but don't make that a condition to show a lit torch. Regular switches will also work, but a different switch will be required for each torch.
How does one go about doing that? I tried changing the common event from increasing the variable value to +1, to switching self switch to A but now it doesn't light at all.
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
947
Reaction score
2,217
First Language
Not English
Primarily Uses
RMMV
Don't use common events. Turn on self switches when the projectile hit the lights. Make an event page with condition self switch on. There make the event graphic the lit up torch.
 

deveras111

Veteran
Veteran
Joined
Dec 29, 2018
Messages
39
Reaction score
5
First Language
English
Primarily Uses
RMMV
Don't use common events. Turn on self switches when the projectile hit the lights. Make an event page with condition self-switch on. There make the event graphic the lit up torch.
Okay, this actually worked! There actually is a way to set the projectile to activate the self-switch A of an event, and now it only lights up the torch that I hit with a projectile! The weird part is, whenever I hit a different torch with the projectile, the animation still only plays for the first torch? I don't really understand how that is even happening.
 
Last edited:

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
947
Reaction score
2,217
First Language
Not English
Primarily Uses
RMMV
Can you show screenshots of tge event pages?
 

deveras111

Veteran
Veteran
Joined
Dec 29, 2018
Messages
39
Reaction score
5
First Language
English
Primarily Uses
RMMV
Can you show screenshots of tge event pages?
Okay, wow, I figured out what I was doing wrong. In copy and pasting the event to other torches, I wasn't changing the "show animation on event 5" on each individual new torch, so I was basically telling the event to only show it on that torch :guffaw::guffaw:

Thank you @Hyouryuu-Na and @shockra you helped me out a lot!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,231
Members
137,607
Latest member
Maddo
Top