PDA

View Full Version : Infinite Hero invasions



Keeper_Infernal
July 31st, 2012, 12:56
Ive tryed to do this for an hour,yet I got 2 results,infinite amount of heros all coming at once,or 2 parties and then nothing...

I can try to do it on by on with the when time is trigger,but it would take hours to finishe.. searched whole forum by the way.. nothing..

Pleas help me? :(

Keeper_Infernal
August 3rd, 2012, 09:08
44 views and not even one wiseman to answer me?...

Hapuga
August 3rd, 2012, 11:39
known issue, avid by using doubly-linked conditions (flip-flop, if one fails, another triggers).

Keeper_Infernal
August 4th, 2012, 17:04
Um WHAT? oO (like trying with timers and then with flags,and repeat? dont get it...)

Kaelthaz
June 26th, 2013, 01:40
Ive tryed to do this for an hour,yet I got 2 results,infinite amount of heros all coming at once,or 2 parties and then nothing...

I can try to do it on by on with the when time is trigger,but it would take hours to finishe.. searched whole forum by the way.. nothing..

Pleas help me? :(

I read this from the manual and it explains that if you don't do certain steps then that infinite number of heroe parties appear at once:

Replacing the Patrol Party

One of the DK2 Editor's most endearing features is that you can hang triggers off creatures or Hero Parties on the Script Tree. This will allow you detect when the patrolling Heroes have been defeated and send a new Hero Party to replace them. After all, everybody knows that Heroes are suckers for punishment.

Right-click on the text Hero Party 2 on the Script Tree,
Choose Add Trigger,
Choose the Party tab,
Set the trigger to read:

When Members Incapacitated equal to n

Where n is the number of creatures in the Hero Party.
Hang an action off this trigger which reads:

Flag 3 = 1

Create another action from this trigger,
Choose the Timer tab,
Accept the default setting Initialise Timer 1,

So when the Hero Party is defeated, Flag 3 will be set to 1 and Timer 1 will start ticking.

For the replacement party, you will create a second instance of the original Hero Party. All the triggers and actions which hung off the Hero Party will be cancelled, and created afresh on the new Hero Party. This will allow you to set up a repeating script which automatically generates a replacement patrol force every time the old one is destroyed.

The script for this section is a bit complicated – go through the instructions step by step to make sure you've created the script correctly. Note that you need to hang the triggers off one another in series, so that only when the conditions for all the triggers are met will the actions happen.

Create the following series of triggers and actions hanging off the level's name on the Script Tree:

Level's Name
T: When Flag 3 = 1 (when Hero Party 2 destroyed)
T: When Timer 1 >= 120 (and 2 minutes have passed since it happened)
T: When Flag 1 = 0 (and if the Hero Gate hasn't been collapsed)
A: Create Hero Party 2 at Action Point 1
A: Flag 3 = 0

(Key: T: means it's a Trigger, A: means it's an Action)
Right-click on the trigger When Flag 3 = 1,
Choose Edit Trigger Properties from the popup menu,
Choose the Repeat tab,
Set the trigger to repeat 30 times,
Repeat for the other two triggers in the series.

By setting the three triggers to repeat 30 times, you have ensured that the Hero Party will be replaced 30 times. You could set them to repeat Always, but Always triggers should be used with great caution because it can lead to the creation of infinite numbers of creatures, at which point the game will crawl to a halt and probably crash.

Note: if Flag 3 were not reset to 0, then 30 instances of Hero Party 2 would be created in quick succession, rather than one being created when the previous instance is defeated.

paku901
June 22nd, 2014, 08:43
Heya,

for me following works with Hero Party Invasions:

On the Hero Party:
When Created

Flag 1 = 1

General Trigger:
When Flag 1 = 1

Flag 1 = 0

Initialize Timer 1

General Trigger:
When Timer 1 = 360

Create Hero Party 1 at AP 1

If you want more Hero Parties, then use Timer2, Flag2 and there you go.

Important (without it will not work):
Right-Click on every single trigger you created (on ALL 3)
Go to Tab Repeat
Select "Always"
Press OK