PDA

View Full Version : Hero Portals



Altarim
June 11th, 2010, 19:04
Hello there.

I'm new to mapmaking in DK2 and i have a question about how to make a hero portal that will work at "My Pet Dungeon" hero portals, where you can launch a hero invasion when you want to.

Thank you for your time.

DragonsLover
June 12th, 2010, 08:41
Hello and welcome, Altarim! :)

First, I invite you to read the editor's manual (http://keeper.lubie.org/dk2_docs/dk2_editor_manual.htm) to know how to create a hero gate (and not portal) that can be collapsed or not.

Next, to make the "Trigger single hero invasion" and "Trigger continual hero invasion", you simply have to do the followings:

For "Trigger single invasion":
1. Right-click on "Player" Keeper in the script tree
2. Select "Add trigger"
3. Click on the "GUI" tab
4. Select "Button Pressed" for the first dropdown list, "Misc Button" for the second one and "MPD Single Invasion" for the third, then click OK
5. Right-click on the new trigger you added
6. Select "Add action"
7. Click on the "Party" tab
8. Select the Hero Party you want to add and which action point, then be sure to check "Invasion Party". If you want random heroes, check "Random Creature Types" also, which is recommended for a MPD level. Click OK when you're done
If you want the game to zoom at the hero gate, do the next steps:
9. Repeat step 5 and 6
10. Click on the "AP" tab
11. Select "Zoom to Action Point" in the dropdown list and select the same action point you used for the hero gate, then click OK
You're done!

You should get this in your script tree:

When Button [ Misc Button - MPD Single Invasion ] Clicked
├ Create Invasion Party x At AP y[IP - Random ] (x and y being numbers)
└ Zoom to AP yFor "Trigger continual invasion":
1. Repeat steps 1, 2 and 3 above
2. Select "Button Pressed" for the first dropdown list, "Misc Button" for the second one and "MPD Continual Invasion" for the third, then click OK
3. Right-click on the new trigger you added
4. Select "Add action"
5. Click on the "Flag" tab
6. Set an unused flag to be equal to 0. For example, select "Flag 1", "Equal" and "0", then click OK
7. Repeat step 3
8. Select "Add trigger"
9. Click on the "Flag" tab
10. Here, you have to use another flag for when it is equal to 0. For example, select "Flag 2", "Equal to" and "0", then click OK
11. Right-click on that new trigger
12. Select "Add action"
13. Click on the "Flag" tab
14. Set "Flag 1" to be equal to 1, then create another action to set the "Flag 2" to be equal to 1.
15. Repeat steps 7, 8 and 9 (for step 7 that points to step 3, you must right-click on the first trigger, the one that tells when the button is clicked)
16. Do the same as step 10, but for "Flag 1"
17. Right-click on that new trigger then do the same once again, but for "Flag 2" and when the value is equal to 1.
18. Add an action to that trigger that sets the Flag 2 to 0.
19. Finally, right-click on "Player" Keeper
20. Select "Add trigger"
21. Click the "Flag" tab
22. Select "Flag 2", "Equal to" and "1", then click OK
23. Right-click on that trigger
24. Select "Add action"
25. Click on the "Party" tab
26. Do the same thing as if you wanted to created a hero invasion like I explained earlier
You're done!

You should get this in your script tree:

When Button [ Misc Button - MPD Continual Invasion ] Clicked
├ Flag 1 = 0
├ When Flag 2 = 0
│ ├ Flag 1 = 1
│ └ Flag 2 = 1
└ When Flag 1 = 0
└ When Flag 2 = 1
└ Flag 2 = 0
When Flag 2 = 1
└ Create Invasion Party x at AP y[IP - Random ] (again, x and y being numbers)Hope that helps! :)

Altarim
June 12th, 2010, 10:29
Hey there and thanks for the answer.

I followed you instructions untill step 7. When i choose the "Add action" option i dont get to any "Party" option. I have "Availability", "Flag", "Timer", "Info", "Game", "GUI", "Map" and "Creature". In the "Creature" tap i tried to just add some random creature and check if that worked, but it didnt, so not sure what that is. Instead of choosing "Add action" when right clicking the trigger i also tried the "Add creature action" and then added my Hero party to it, but didnt work either.

Thanks for the answer though. I hope you can help me again :)

DragonsLover
June 14th, 2010, 02:15
To make the Party and AP tabs to appear, you must be sure that you have at least a Party and an Action Point. If you don't have one of these, you can't.

Altarim
June 14th, 2010, 21:51
Thanks again for the answer, got be further ones again. Now i've created an Action Point by the portal and set it up as is states in the manual. Also, ive opened some My Pet Dungeon maps, and my action point and heroparty and triggers looks identical. But when i start the game, there's no button for me to push to start the invasion. Any more thoughts? :)

DragonsLover
June 16th, 2010, 01:38
Did you check the "MPD Level" checkbox in the Level Variables? If you can get access to your new level in the MPD level list (by clicking on "Others" in the menu), then you should be able to get the buttons.

Altarim
June 16th, 2010, 10:24
Hello again, and once again thanks for the answer.

Now the portal triggers work perfectly so thanks alot for that. I do have to play it under a MPD map for the button to be available (Aint available in Multiplayer or Skirmish), but that's no problem.

Now a new problem arises that i cant seem to figure out either. No creatures spawn through my portals. No matter how many portals i own, no matter how many rooms i build of great size and all that. No creatures comes.

Again, i'd like to add that i'm very new to this and though i've figured out ALOT of great tools and quirks i just cant figure out why no creatures will spawn.

Hope you can help me once again, hehe.

DragonsLover
June 16th, 2010, 19:59
Did you add creatures into the creature pool of the player? Right-click on the Player Keeper in the script tree and select "Keeper properties". Then, by using the "Creature Pool" dropdown list, add creatures allowed for the player to attract.

Otherwise, I don't see... It should work.

Altarim
June 17th, 2010, 12:40
Finally everthing is working, thank you for you help and patience :)

DragonsLover
June 18th, 2010, 02:23
No problem! You're welcome! :)

Have fun!