Heroes IV: Problem with using "guard"
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Heroes IV: Problem with using "guard"
So I place a creature on the map with the map editor, and set it to "guard" instead of "wander."
Why does this seem to not always work? I've seen several instances while testing my current map where a creature who is set to "guard" his location will either sometimes move, or attack if the player gets too close.
Anyone have any insight into this? It's extremely annoying.
Possibly of note: I've set the creature to a color.
Why does this seem to not always work? I've seen several instances while testing my current map where a creature who is set to "guard" his location will either sometimes move, or attack if the player gets too close.
Anyone have any insight into this? It's extremely annoying.
Possibly of note: I've set the creature to a color.
I just managed to observe that for coloured AI armies on ships. They don't want to stand still.
Ship or not and whatever the reason, you can force the naughty monster to stand still by putting it on a stone (or any other small, impassable object). You can then bomb out the stone when the monster gets defeated. (trigger the bomb from 'defeated' script)
The drawback is that then, the monster will only guard 1 tile. I mean, if the passage is more than 1 tile wide, the monster will not really guard it.
So, it's not always a good workaround.
Maybe try to construct a minimum working example of the problem?
Ship or not and whatever the reason, you can force the naughty monster to stand still by putting it on a stone (or any other small, impassable object). You can then bomb out the stone when the monster gets defeated. (trigger the bomb from 'defeated' script)
The drawback is that then, the monster will only guard 1 tile. I mean, if the passage is more than 1 tile wide, the monster will not really guard it.
So, it's not always a good workaround.
Maybe try to construct a minimum working example of the problem?
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Maciek, thank you for your response! I think this workaround will more than suit me for what I need to do!Maciek wrote:I just managed to observe that for coloured AI armies on ships. They don't want to stand still.
Ship or not and whatever the reason, you can force the naughty monster to stand still by putting it on a stone (or any other small, impassable object). You can then bomb out the stone when the monster gets defeated. (trigger the bomb from 'defeated' script)
The drawback is that then, the monster will only guard 1 tile. I mean, if the passage is more than 1 tile wide, the monster will not really guard it.
So, it's not always a good workaround.
Maybe try to construct a minimum working example of the problem?
How do I set this rule for all creatures, colored or no? Is this in the map editor or is it during the prologue screen where you select it?Kalah wrote:What have you set as the custom rule for all monsters on the map? Guard or wander?
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Well looks like I spoke too soon about the workaround being everything I needed.
So one of the things I'm trying to do, is have some creatures that will join you. Now I saw this done on one of the Gathering Storm maps, and I thought it was an encountered script that just changes the creatures' color, but I tried that and it didn't work. Ended up fighting the creatures still and controlling BOTH sides of the battle.. kind of a strange bug..
So then I tried to put a placed event a few spaces from the creatures that I wanted to have join the player.. and the creature decided to move toward the placed event so that the player would still have to fight them.
Placing a rock under the creature to keep them from moving works.. but if the creature is supposed to join the player, the rock can't be deleted, because apparently trying to delete and adventure object with a creature there will crash the game :\
I guess I'll just go back to surrounding the creature with rocks and when the player hits the placed event to make the creatures join, it also deleted the rocks.
So one of the things I'm trying to do, is have some creatures that will join you. Now I saw this done on one of the Gathering Storm maps, and I thought it was an encountered script that just changes the creatures' color, but I tried that and it didn't work. Ended up fighting the creatures still and controlling BOTH sides of the battle.. kind of a strange bug..
So then I tried to put a placed event a few spaces from the creatures that I wanted to have join the player.. and the creature decided to move toward the placed event so that the player would still have to fight them.
Placing a rock under the creature to keep them from moving works.. but if the creature is supposed to join the player, the rock can't be deleted, because apparently trying to delete and adventure object with a creature there will crash the game :\
I guess I'll just go back to surrounding the creature with rocks and when the player hits the placed event to make the creatures join, it also deleted the rocks.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
After much testing, I finally figured out that there is a problem with the script "Delete adventure objects" when it is being called from a triggered script (there seem to be a lot of bugs using triggered scripts..).
There is, apparently, no problem putting a bomb on top of a creature and using the delete adventure objects script on top of it (I thought there initially was because I was calling delete adv obj from a triggered script attached to the creatures).
So far the workaround proposed by Maciek should work for what I need to do, but I would still like to figure out about the "guard" issue.
There is, apparently, no problem putting a bomb on top of a creature and using the delete adventure objects script on top of it (I thought there initially was because I was calling delete adv obj from a triggered script attached to the creatures).
So far the workaround proposed by Maciek should work for what I need to do, but I would still like to figure out about the "guard" issue.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
Hmm, but wouldn't that be for creatures that aren't aligned with any player color? I have a hard time believing that extends to any creature (including heroes) that are flying a colored flag.Kalah wrote:If you set monsters to wander, they will wander no matter what you set in the editor. I seem to remember this is how it works, although it's years since I used the editor and I may be remembering wrong ...
I don't think I mentioned it earlier, but I have a hero on this same map set to guard, that was moving as well.
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
I can't check and it's been a while.. but like Kalah I'm pretty sure the player's choice overrules editor settings for neutral armies. I'm not sure if that extends to coloured armies.
Also, note that if coloured armies can interact/combine/split, any script or setting on the army will be lost.
Also, note that if coloured armies can interact/combine/split, any script or setting on the army will be lost.
Are you suggesting coconuts migrate?
- iLiVeInAbOx05
- Equilibris Team
- Posts: 788
- Joined: 21 Jul 2014
The colored armies (and heroes) in question aren't able to interact with any of the other same colored armies. They only seem to move once, and then never again.wimfrits wrote:I can't check and it's been a while.. but like Kalah I'm pretty sure the player's choice overrules editor settings for neutral armies. I'm not sure if that extends to coloured armies.
Also, note that if coloured armies can interact/combine/split, any script or setting on the army will be lost.
Are there any green towns in this map?Taro wrote:No, this army just stands in one place. This army is not neutral, it belongs to green player.
I have encountered the issue with guard long ago while making Astral Romance campaign. There in second map an army is protecting the Asu prison. I had to think up some mechanism to prevent that the army even with guard could trigger some events - which ment that it moved. In my new campaign I have the same thing. I had to write that campaign works only with guarding enemies...
funny 'coz I haven't envountered this in any of my maps. my experience is that when you choose guard/mobile troops before game start, it affects only those creatures which hasn't been preset in editor. now judging from your test I might be wrong though.
Oh, do note that this can only work if stack is neutral. if colored they will always attack you.
Iliveinabox, drop me a pm with your email and I will send you a test map of how I used the script: enemy will change upon encouter WITHOUT fighting both sides (it can be done).So one of the things I'm trying to do, is have some creatures that will join you...So then I tried to put a placed event a few spaces from the creatures that I wanted to have join the player.. and the creature decided to move toward the placed event so that the player would still have to fight them..
Oh, do note that this can only work if stack is neutral. if colored they will always attack you.
I'm silent in seven languages - and I got all my familys fear.
Everytime you throw dirt, you loose a little ground
Everytime you throw dirt, you loose a little ground
Who is online
Users browsing this forum: No registered users and 0 guests