Giving out Pokegear Apps

DotDotDot

Novice
Member
Joined
Apr 18, 2017
Posts
16
I've added a few pokgear apps and I was wondering if how I could make it so that certain NPC's give these apps out (Like in DPPt)?
 

Vendily

Cooltrainer
Member
Joined
May 16, 2017
Posts
130
I don't know what version you're on (but it's still basically the same.)
I'm assuming you've already mirrored the code in the area. Something like this probably?
Code:
	@cmdMap=-1
	@cmdPhone=-1
	@cmdJukebox=-1
	@cmdNewcmd=-1
	commands[@cmdMap=commands.length]=_INTL("Map")
	commands[@cmdPhone=commands.length]=_INTL("Phone") if $PokemonGlobal.phoneNumbers && $PokemonGlobal.phoneNumbers.length>0
	commands[@cmdJukebox=commands.length]=_INTL("Jukebox")
	commands[@cmdNewcmd=commands.length]=_INTL("New CMD")
Now can I get your attention to the line for the Phone. You see the
Code:
 if $PokemonGlobal.phoneNumbers && $PokemonGlobal.phoneNumbers.length>0
That makes it so the phone will only appear if the player has more than 1 phone number. We just need to add a condition to our command to do something similar (I'm gonna use a switch to activate it, but you can use a variable that your app is dependent on, if any)
Code:
	@cmdMap=-1
	@cmdPhone=-1
	@cmdJukebox=-1
	@cmdNewcmd=-1
	commands[@cmdMap=commands.length]=_INTL("Map")
	commands[@cmdPhone=commands.length]=_INTL("Phone") if $PokemonGlobal.phoneNumbers && $PokemonGlobal.phoneNumbers.length>0
	commands[@cmdJukebox=commands.length]=_INTL("Jukebox")
	commands[@cmdNewcmd=commands.length]=_INTL("New CMD") if $game_switches[XXX]
 
Last edited:
Top