PDA

View Full Version : Testmap: ally PLAYER_GOOD ally destroyed after Heroes Heart is!



0etelaer
July 10th, 2021, 16:19
Yesterday TheTreeBeard would upload a video to Youtube, on him playing Reaver Verruckt.
Unfortunately, the map ended anti-climactic, because the Heroes would take down the Green Keeper, although it was allied with it.


https://www.youtube.com/watch?v=W98QWSfMDZo


Udo Krawallo noted, that this maybe due to the heroes heart being destroyed.

And this is correct. When the white heart is destroyed, the script for PLAYER_GOOD will end to be implemented, on the level.
This means, that PLAYER_GOOD is no longer allied with the Green Keeper in that map, PLAYER2, although the Green Keeper is still allied with the heroes, white!
And therefor, the heroes will destroy the green keeper, while the green keeper can not defend itself, because it is allied to the attacker.

I didn't know this before, neither did Duke Ragereaver, and I experienced the same problem some weeks ago when I played this map (https://lubiki.keeperklan.com/html/dk1_maps_lone.php?start=01206), that I made 20 years ago.

Any ways, in order to prove that this is the case, I made a test map, where the ally script is destroyed, after the white heart is destroyed, and one can not defend against it.
2137
In this map, you are allied with the Heroes, but than Green destroys the White Dungeon Heart, and White will attack you, while you can't defend against it.

If any one can win this map, please let us know!

I may want to remark, that all PLAYER_GOOD scripts work fine, without it having a Dungeon Heart. This only happens when white was given a Dungeon Heart, that gets destroyed.

2138

YourMaster
July 10th, 2021, 20:06
I talked to duke about it when tree first played it, and he was indeed not aware. You can change the map to set the alliance again after good heart is destroyed.

AdamP
July 10th, 2021, 22:31
Any ways, in order to prove that this is the case, I made a test map, where the ally script is destroyed, after the white heart is destroyed, and one can not defend against it.
2137
In this map, you are allied with the Heroes, but than Green destroys the White Dungeon Heart, and White will attack you, while you can't defend against it.

If any one can win this map, please let us know!

I may want to remark, that all PLAYER_GOOD scripts work fine, without it having a Dungeon Heart. This only happens when white was given a Dungeon Heart, that gets destroyed.

2138

I just tried the test map, and the heroes and my creatures attacked each other as soon as the Hero Heart was destroyed. My creatures won easily.

YourMaster
July 11th, 2021, 00:29
Yes, and if you add this to the script:



IF(PLAYER_GOOD,DUNGEON_DESTROYED == 1)
ALLY_PLAYERS(PLAYER_GOOD,PLAYER0)
ENDIF


The green units will remain unharmed.

Endrix
July 17th, 2021, 10:31
I had the same problem here

https://keeperklan.com/threads/7171-Dunkeons-3

This

IF (PLAYER_GOOD, DUNGEON_DESTROYED == 1)
ALLY_PLAYERS (PLAYER1, PLAYER_GOOD, 1)
ALLY_PLAYERS (PLAYER2, PLAYER_GOOD, 1)
ALLY_PLAYERS (PLAYER3, PLAYER_GOOD, 1)
ENDIF

Didn't fix the problem.

jieletian
July 17th, 2021, 13:52
I also experienced the exactly same problem when playing this map. Seems to be a kind of game mechanic.

AdamP
July 17th, 2021, 17:37
I've just tried the test map again on the latest build, and the problem still didn't happen. What am I doing right that you lot are doing wrong?

Edit: Am I misunderstanding the problem? Is the alliance supposed to be broken when one of the player's hearts is destroyed?

YourMaster
July 17th, 2021, 19:12
I had the same problem here

https://keeperklan.com/threads/7171-Dunkeons-3

This

IF (PLAYER_GOOD, DUNGEON_DESTROYED == 1)
ALLY_PLAYERS (PLAYER1, PLAYER_GOOD, 1)
ALLY_PLAYERS (PLAYER2, PLAYER_GOOD, 1)
ALLY_PLAYERS (PLAYER3, PLAYER_GOOD, 1)
ENDIF

Didn't fix the problem.

Are you sure it didn't fix the problem? If so, please share the map as you tested it.

Endrix
July 26th, 2021, 16:41
In my map version Dunkeons 3 V. 1.1.zip is this.
The user EadWard wrote he was playing this version and the problem occurred. I'm not sure, but I think I tested it afterwards too.

YourMaster
July 26th, 2021, 19:22
In my map version Dunkeons 3 V. 1.1.zip is this.
The user EadWard wrote he was playing this version and the problem occurred. I'm not sure, but I think I tested it afterwards too.

I just checked that level, but that script is broken due to too many conditions and values.

Endrix
July 27th, 2021, 12:49
Do you mean IF's? I have counted, I come to the maximum of 48.

More than 64 script values ?

YourMaster
July 27th, 2021, 13:18
When you are making a map, you do not need to count yourself. KeeperFX will check the script as soon as you load it up.
So:
1) Start the map
2) Exit the game
3) Open keeperfx.log
4) Go to the line in the log that starts with 'load_script', there it says how many of each limit you have. You'll never see yourself go over, but then you have errors right above.

You have exceeded script variables yes (how many things inside an if-statement), this is problematic. It seem you do indeed have exactly 48 if-statements, so that's fine.