• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Battle✓] Want to create Trainer and have give item

13
Posts
4
Years
    • Seen Nov 20, 2023
    Hey I want to edit an existing person on map that gives you an item but want them to battle first then give item how do that
     
    247
    Posts
    6
    Years
    • Seen May 2, 2024
    Hey I want to edit an existing person on map that gives you an item but want them to battle first then give item how do that

    To do this, you'll first need to make a separate script that just involves the person giving the player the item. Next, you'll need to make sure that, when you initially interact with the person, they run either trainerbattle_single or trainerbattle_double. Pass in the trainer constant, their intro text, their lose text, and then pass in the name of that script you created where the person gives the player the item. It'll look something like this:
    Code:
    EventScript_Person::
    	trainerbattle_single TRAINER_PERSON, Text_PersonIntro, Text_PersonDefeat, EventScript_PersonGiveItem
    	[whatever stuff you want to happen if you can't battle them]
    	release
    	end
    
    EventScript_PersonGiveItem::
    	giveitem ITEM_WHATEVER
    	[whatever stuff you want to happen]
    	release
    	end
     
    Back
    Top