Trigger common event or turn switch on close EquipScene ***SOLVED***

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
41
First Language
czech
Primarily Uses
RMMV
Hello. 


I am using custom made graphic (and various bonuses linked to weapon type + variables). 


Based on this - bonuses and also actor graphic should change when actor change equipment. 


If he changes axe to sword, it should be represented on his graphic, and variable SwordMastery should be used to calculate bonuses - simply using 


$game_actors[ActorID].equips[WeaponTypeID].wtype_id  


I can do everything I need inside common event. I just need to have an option to call my event, after EquipScene Window is closed. Checking periodically using paralel common event is not what I like. 


I was told I need a plugin to be able to do that. 


Ideally - the plugin would have parameter "Close EquipScene Switch ID"  which is set in plugin parameters.


On EquipScene Close I just need turn this switch (based on plugin parameter) ON. 


Then I do rest ingame simply using common event with autorun based on the same switch.


Anybody can help? :)
 
Last edited by a moderator:

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
41
First Language
czech
Primarily Uses
RMMV


Thank you very much. Anyway, there is one small oversight on my side.  It works perfectly on field - anyway I am using lots of Yanfly scripts - and this one  http://yanfly.moe/2016/03/13/yep-83-change-battle-equip/ probably using different methods but you can change equipment with it inside battle as well. 


Can you per chance include compatibility with it inside your nice plugin? :)
 

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,402
Reaction score
316
First Language
Portuguese
Primarily Uses
RMMV
Weird, it works with no change for me.


Are you sure it doesn't for you? Make a battle with a page that activates with the switch to check
 
Last edited by a moderator:

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
41
First Language
czech
Primarily Uses
RMMV
Weird, it works with no change for me.


Are you sure it doesn't for you? Make a battle with a page that activates with the switch to check
I made common event with only text message "test"  and turn switch 20 Off on it, It will trigger on Autorun if switch 20 is ON. At field it works. 
 


I made same inside Troops Battle Event page 


It will trigger with switch 20 is ON. Span Moment. 


No effect


I am using heap of Yanfly plugins so I tried put your one as first and as last plugin in manager. Again ni effect. 
 

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,402
Reaction score
316
First Language
Portuguese
Primarily Uses
RMMV
Did you finish giving commands and actually start the turn?


Because I did the same here and it worked as soon as the last command was given... But I put it to span battle.


Then put in moment and it worked again. Twice.


If there is a compatibility problem, it is not with that plugin...
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,492
Reaction score
12,035
First Language
English
Primarily Uses
RMMV
Common events controlled by switches do not run in battle.  If you turn the switch on, the common event will run after you return to the map.  If you want it to run during battle you will either need to have an event page for every troop that constantly checks if switch 20 is on (turned on by the plugin) and if it is, do a Call Common Event command.  Otherwise you will need a plugin that will allow common events to run during battle without being called explicitly.  I know Hime wrote one for Ace, but I don't know if there's one for MV.
 

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,402
Reaction score
316
First Language
Portuguese
Primarily Uses
RMMV
Oh, did not even notice he made a common event... I used a normal troop event to check if the switch was on.


Well, if you go through troops to do the event in battle there is this since you said you already use Yanfly plugins
 
Last edited by a moderator:

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
41
First Language
czech
Primarily Uses
RMMV
I made troop event activated by switch as well but game got stuck. Most likely conflict with some other plugin, because I tried exacly the same setup -  with fresh empty project with only necessary plugins and it works. 


I am going to check which plugin causes conflict then. 


Thank you very much. 
 

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
41
First Language
czech
Primarily Uses
RMMV
Now I feel really stupid :(


I did not change anything  in my main project.  Just open my project again after I tested it in clean one - and it works - even with all other scripts on.    


So probably everything was correct. Maybe I just forgot click save project before testing or so, or maybe it was because I tried only as battle test before. Dunno. Tested it multiple times now -  It just started to work - even in Battletest even in project :) .
 
Last edited by a moderator:

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,402
Reaction score
316
First Language
Portuguese
Primarily Uses
RMMV
Oh...


Well, good. I had no idea what could ever cause compatibility problems in that small a script.


Have fun!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Who loves the Final Fantasy series?~
Weather and time system twin release. Now with weather icons and possibility to add them in your custom clock!
Kingdom Under Fire: The Crusaders is finally being ported to PC. I loved playing that game on the original Xbox.
A friend told me to stop making nomnom or gulping noise when eating or drinking. Plot twist of my life. I thought people can't hear that!

Forum statistics

Threads
94,411
Messages
920,757
Members
124,207
Latest member
AshleyBrowney
Top