This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
hpl2:tutorials:level_editor:combininghammerchipperjenniferorange [2012/06/26 13:55] cyfiawn |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | ||
- | ====== Combining Your Hammer And Chipper ====== | ||
- | ====== | ||
- | |||
- | |||
- | Today I have what seems like a difficult tutorial, but is surprisingly extremely easy. I'll be teaching you how to combine your hammer and chipper.<nowiki> *</nowiki><nowiki>*</nowiki>NOTE: THIS TUTORIAL __**DOES NOT ** __EXPLAIN HOW TO MAKE THE ANIMATIONS TO USE THE HAMMER/CHIPPER COMBO.<nowiki>*</nowiki><nowiki>*</nowiki> | ||
- | ===== Let's Begin! ===== | ||
- | |||
- | |||
- | First off, select and place a hammer and chipper in your map. Re-name them whatever you'd like; I've named my hammer **hammer_1**and my chipper **chipper_1**. Don't forget to hit ENTER, so it saves! Next, open your custom_stories folder. Then, open yourmapname's folder. Lastly, open your maps folder. Create a new text document by right-click: new text document. (or however you make a new one.) Re-name this new text document to **Inventory.hps**. Be sure the extension changes to .HPS! Open your new Inventory.hps file. Paste this inside: | ||
- | <code actionscript> | ||
- | |||
- | |||
- | //COMBINE HAMMER// | ||
- | //////////////////// | ||
- | |||
- | void hammer_chipper(string &in asItemA, string &in asItemB) | ||
- | { | ||
- | PlayGuiSound("15_make_hammer", 1.0f); | ||
- | RemoveItem(asItemA); RemoveItem(asItemB); | ||
- | GiveItem("stone_hammer_chipper", "Puzzle", "stone_hammer_chipper", "stone_hammer_chipper.tga", 0); | ||
- | } | ||
- | |||
- | //////////////////////////// | ||
- | // Run at the start of the game. | ||
- | void OnGameStart() | ||
- | { | ||
- | |||
- | /////HAMMER & CHIPPER COMBO///// | ||
- | AddCombineCallback("hammer_chipper", "hammer_1", "chipper_1", "hammer_chipper", false); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | } | ||
- | |||
- | </code> | ||
- | |||
- | |||
- | Note under AddCombineCallback "hammer_1" and "chipper_1". These two names will vary based on what you named your hammer and chipper. If you have to change them, it's hammer name first, then chipper name, don't forget! | ||
- | |||
- | |||
- | Enjoy combining your hammer and chipper. | ||
- | |||
- | |||
- | Thanks for tuning in! | ||
- | |||
- | |||
- | Created by JenniferOrange | ||