• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Help With Making Jobs

Status
Not open for further replies.
Level 3
Joined
Sep 19, 2011
Messages
14
Ok, so im working on a rpg real life map.
I know about triggers and how to make recipes.
i have only done basic dialog variables.
i also have made a "ability" to interact with units.
I have everything set up idea wise except for how to actually put it together in code.
what im looking for is:
Player gets "cook" job.
Player interacts with "Waiter" and waiter responds with a dish.
the dish can be one random of say 10 different dishes.
player must use kitchen items to make that recipe. the harder the recipe the more you get paid.
sorry if you need more details on anything please email me at [email protected] or message/reply on here!
THANK YOU SO MUCH FOR HELP
 
Level 15
Joined
Oct 18, 2008
Messages
1,591
you need some kind of database for that like:
foodNamesArray[0] = "fried egg"
foodValueArray[0] = 10

also you need a hashtable for the ingredients:
ingredientNumberArray[0] = 2
0 of 0 of IngredientHashTable = egg
1 of 0 of IngredientHashTable = spice

and you check the ingredients with a loop going from 0 to ingredientNumberArray[Recipe Number]

you can also randomize a recipe this way
 
Level 3
Joined
Sep 19, 2011
Messages
14
sorry im not quite understand hashtable. although i do understand overall what i need, i just cant really figured out exactly how to throw this together. is it possible if someone could be so nice to make a simple version or demo map i could easily work some items into and stuff for this. i would really appeciate it!
 
Level 15
Joined
Oct 18, 2008
Messages
1,591
then why don't u post it in request section? trigger section is about asking for trigger basic shape or debugging a trigger, not requesting one. Hashtables is easy to use, they are just like an Excel table. You only have to do this when u initialize the trigger:
  • Hashinitialize
  • Hashtable - Create Hashtable
  • set RecipeHashtable = Last Created Hashtable
 
Status
Not open for further replies.
Top