Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

oh okey, can you give me example code that check if i have a 2 potion in my inventory to perform a script

I'm reading your question as "you need to find 2 separate potions to unlock a cutscene" and then you'd do something like,

if(inventory_has_item(FIRST_POTION) && inventory_has_item(SECOND_POTION)){
  csc_enqueue( ... ) //stuff from the good cutscene where you cure the sick grandma)
}
else{
  csc_enqueue( ... ) //stuff from the bad cutscene where you're told you need to find both the potions
}

If it's two of the same potion you'd use inventory_has_item(POTION,2) (it can check for specific quantity)

(+1)

thanks yal, finally work

(1 edit)

Pertanyaan lain, bagaimana cara mengatur item spesifik yang hilang setelah digunakan dengan cara yang sederhana? Saya masih belum mengerti skrip kehilangan item inventaris. Terlalu rumit bagi saya.

(+1)

nevermind fix it 😀

Great, because I wouldn't have been able to understand the question... :P

You're getting pretty good at this now, that's two problems in a row you managed to figure out on your own! ^__^

i still has one problem about gift pokemon, so instead in party i using the box to store. Can you give me the full code to manually send to empty party or box? 

Something like this:

var namp;
namp = amp_get_new_party_id()
if(namp != NONE){
     //Fits in party
     amp_generate_monster(namp, SPECIES, LEVEL)
}
else{
     namp = amp_get_new_box_id()
     if(namp != NONE){
         //Placed in box
         amp_generate_monster(namp, SPECIES, LEVEL)
     }
     else{
         //No room, can't be taken
     }
}
(+1)

thanks yal 😁