The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: kenth21v on July 27, 2011, 07:32:45 AM

Title: [xp] please convert this simple conditional branch into script. [solved]
Post by: kenth21v on July 27, 2011, 07:32:45 AM
Conditional Branch: [Page1] in inventory
@> Text: Page 1 required!
Branch End
[Page 1] is the item i need to be required before an event should run.

thanks !
Title: Re: [xp]quick question. please convert this simple conditional branch into script.
Post by: LoganF on July 27, 2011, 08:50:45 AM
Why does this need a script may I ask?

You can do this with the Conditional Branch as it is. Perhaps I am misunderstanding something (and I am probably not alone in this)?
Title: Re: [xp]quick question. please convert this simple conditional branch into script.
Post by: pacdiggity on July 27, 2011, 09:33:11 AM
To properly convert it into script, we would need to know the ID of the item in the database.
Title: Re: [xp]quick question. please convert this simple conditional branch into script.
Post by: kenth21v on July 27, 2011, 02:36:18 PM
well what i really need to know is the "in inventory" code.
i want it to be in script because I made a GATE locked and it will only be unlock if all the pages required is already acquired. For example in a GATE it requires pages 1 to 50 to unlock. just like that.
well i did:
Conditional Branch: [Page 1] in inventory
    Conditional Branch: [Page 2] in inventory
         Conditional Branch: [Page 3] in inventory

and so on and so on..
    Branch end
Branch end

i want it to be scripted to easily code it by its ID. because when using this conditional branch too many, some of it is cannot be seen. it is too much on the right side of the window. and it is too long. i hope you understand what i mean.
what i want to know is how to detect items in the inventory using scripts
the name is the database is simply the number right ? 033: Page1 and 034: Page2 like that.
Thanks :)
Title: Re: [xp]quick question. please convert this simple conditional branch into script.
Post by: ForeverZero on July 28, 2011, 03:17:02 AM
Why not just increase a variable once every time a page is collected by the party, and simply check if that variable is equal to the number of pages needed?  This is kinda assuming each page is a unique item where only one can be collected, but if that is the case, this way would be much easier.