Overworld Shadows for v17

Resource Overworld Shadows for v17

WolfPP

Discord Wolf#1235
Member
Posts
58
#41
Thank you so much! Also, to fix the weird bug where shadows don't appear until you get a Pokemon: (Credit to seth_Angel on PokeCommunity for this)
Was Vendily, not seth_Angel. Also, i made somes att today. Check the thread on PC Forum again.

About Following Script, i made some att too. Check the thread on PC Forum, into the latest posts.
 

boonzeet

Developer of Pokemon: Secrets of the Ages
Member
Posts
9
#42

I have an NPC that appears with the switch 14 's:PBDayNight.isMorning?' which doesn't get a shadow for some reason, even with the name including a string from Always_Give_Shadow_If_Event_Name_Has.

I've tried it with all of the DayNight switches and none of these events get shadows, but other custom switches work and give the appropriate shadow when they appear.

Is this a bug or is there another step to enable shadows on these events?
 

WolfPP

Discord Wolf#1235
Member
Posts
58
#43

I have an NPC that appears with the switch 14 's:PBDayNight.isMorning?' which doesn't get a shadow for some reason, even with the name including a string from Always_Give_Shadow_If_Event_Name_Has.

I've tried it with all of the DayNight switches and none of these events get shadows, but other custom switches work and give the appropriate shadow when they appear.

Is this a bug or is there another step to enable shadows on these events?
Maybe this can help you.
 

boonzeet

Developer of Pokemon: Secrets of the Ages
Member
Posts
9
#44
Maybe this can help you.
I'm not using the followers - shadows work for all other characters (you can see this on my character and this miltank walking around) but don't with any events that use the DayNight switches in the Event page options.

Edit - the guy with the hat is the NPC using s:PBDayNight.isDay? as the event switch. If I change this to a random switch and set it on, the shadow appears fine. The switch is on, as well, as the event disappears at night.

Here is a side-by-side comparison with two identical events, except for the switch used:

 
Last edited:

WolfPP

Discord Wolf#1235
Member
Posts
58
#45
I'm not using the followers - shadows work for all other characters (you can see this on my character and this miltank walking around) but don't with any events that use the DayNight switches in the Event page options.

Edit - the guy with the hat is the NPC using s:PBDayNight.isMorning? as the event switch. If I change this to a random switch and set it on, the shadow appears fine.
Yep. Did you remove all Followers code stuff inside the script?
 

boonzeet

Developer of Pokemon: Secrets of the Ages
Member
Posts
9
#46
Yep. Did you remove all Followers code stuff inside the script?
The Followers code shouldn't affect a project without the Followers script. I can replicate this on a fresh project with just this script, too:


Edit: From testing, this is the offending line:
Ruby:
page = pbGetActiveEventPage(@character)
pbGetActiveEventPage is returning nothing if one of these switches is used. These switches work by running the script specified in the switch name, so this is causing the pbGetActiveEventPage check on the state of the switches to fail.

Found a fix: replace these two lines in pbGetActiveEventPage:
Ruby:
sw1 = !(c.switch1_valid && !$game_switches[c.switch1_id])
sw2 = !(c.switch2_valid && !$game_switches[c.switch2_id])
with these:
Ruby:
sw1 = !(c.switch1_valid && !event.switchIsOn?(c.switch1_id))
sw2 = !(c.switch2_valid && !event.switchIsOn?(c.switch2_id))
 
Last edited:
Top