Needed help with a Javascript / Event Function

Black Pagan

Veteran
Veteran
Joined
Feb 21, 2017
Messages
350
Reaction score
271
First Language
English
Primarily Uses
RMMV
So, I came across this thread : https://forums.rpgmakerweb.com/index.php?threads/eventing-a-place-able-crafting-system.83283/

Its about Crafting something using 3 Ingredients. Could someone tell me how could i make it so I could craft (Cook) with only 1 Ingredient ? I figured i would just remove the extra Variables 2 and 3 and functions associated with it. I was able to place the Item fine on the Kitchen Cabinet. But when i headed to cook it, It caused an error. I'm sure it has something to do with Multiple Variables and the way it was declared.

So if someone could explain how i could achieve this with just one Variable and Ingredient, It would be great :) If you still don't get what i mean, I mean like : Placing an Ingredient, Cooking it. That's it, No Combinations of Ingredients.

(Edit : It seems I can just delete the other 2 Ingredient Events and pretend like they don't exist and i can get the desired result, just fine. But I'm still curious on most efficient way of achieving this)
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,892
Reaction score
1,026
First Language
Dutch
Primarily Uses
RMMV
so far in the event use arrays (2+) object, you can just go with 1 item.
but you dont really need a script for this, it depends what you want?

like you want fried fish, and it need 1 fish.
than why not on the cook event, cook fried fish?

than show choices yes, no
if yes,
conditional brance, if fish is > 1
cook fried fish
else
you dont have enough fish.
end

but this is a basis, but if you use more items, array can be usefull
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,847
Messages
1,016,968
Members
137,561
Latest member
JaCrispy85
Top