Scripting help please

The old Heroes games developed by New World Computing. Please specify which game you are referring to in your post.
User avatar
Siegfried
Pixie
Pixie
Posts: 124
Joined: 13 Jan 2006
Contact:

Unread postby Siegfried » 21 May 2007, 07:17

As long as the enemy has a castle, any hero or any other stack, there is a theoretical chance of the hero beeing resurrected (check for the availability of a sanctuary on the map). So if the specific hero is killed by a neutral stack, and there would be a theoretical chance of the hero beeing resurrected, then (i think) he is not really dead.

User avatar
RobB
Scout
Scout
Posts: 160
Joined: 16 Nov 2006
Location: Perth W Australia

Unread postby RobB » 21 May 2007, 22:50

I used Humakt's suggested scripts and, on the first run-through, everything worked fine. However, the Baddy was in the final castle and that always did work. All problems seem to arise when he is killed first.

I recently had a similar problem with Beebee and the 3 Pigs: the game just won't finish even though all towns, enemies, etc. have been subdued.
RobB

User avatar
Humakt
Swordsman
Swordsman
Posts: 582
Joined: 06 Jan 2006

Unread postby Humakt » 22 May 2007, 02:01

RobB wrote:I used Humakt's suggested scripts and, on the first run-through, everything worked fine. However, the Baddy was in the final castle and that always did work. All problems seem to arise when he is killed first.

I recently had a similar problem with Beebee and the 3 Pigs: the game just won't finish even though all towns, enemies, etc. have been subdued.
I made small test map and it worked fine in every scenario I tested. I couldn't replicate bug.

Did you use my former or latter suggestion?
Thundermaps
"Death must be impartial. I must sever my ties, lest I shield my kin."

User avatar
RobB
Scout
Scout
Posts: 160
Joined: 16 Nov 2006
Location: Perth W Australia

Unread postby RobB » 22 May 2007, 22:49

The one with a script on every town "captured" event and a continuous event on the bad hero (even though I didn't really understand "owner is human or opposing player is human"). I wrote the scripts exactly as you said.
RobB

User avatar
Humakt
Swordsman
Swordsman
Posts: 582
Joined: 06 Jan 2006

Unread postby Humakt » 23 May 2007, 12:17

RobB wrote:The one with a script on every town "captured" event and a continuous event on the bad hero (even though I didn't really understand "owner is human or opposing player is human"). I wrote the scripts exactly as you said.
Continuous event shouldn't be on hero and especially not on army hero is in. Put it on the map's continuous events instead. I usually say where the script should be if it's located somewhere else than map events.

Also did you set the numeric variable Towns_Owned to number of towns the red (human) player controls at the start of the game like I stated? It is vital for the script to work properly.
Thundermaps
"Death must be impartial. I must sever my ties, lest I shield my kin."

User avatar
RobB
Scout
Scout
Posts: 160
Joined: 16 Nov 2006
Location: Perth W Australia

Unread postby RobB » 23 May 2007, 22:47

Humakt wrote:Continuous event shouldn't be on hero and especially not on army hero is in. Put it on the map's continuous events instead. I usually say where the script should be if it's located somewhere else than map events.
Sorry - my poor writing skills. I meant the event checking the hero's status was a continuous one. It is, of course, a map event.
Humakt wrote:Also did you set the numeric variable Towns_Owned to number of towns the red (human) player controls at the start of the game like I stated? It is vital for the script to work properly.
This wasn't necessary. Red owns no towns at the beginning. Moreover, since the first town reached is inaccessible afterwards (one-way portal), I was able to cut my town count down to 4. I played it again yesterday - caught the baddy early on - and it all worked fine, so I think it's a winner.

I do hope I've got this right. This is Scenario 3 in the campaign, but I have something similar in Scenario 5 which the grand finale.
RobB

rhomboidspace
Leprechaun
Leprechaun
Posts: 27
Joined: 06 Jan 2006

Unread postby rhomboidspace » 06 Aug 2007, 14:30

ok this is resurecting an old thread, but another sugestion although slightly longer you can do a nested set of conditional checks as a continous event, or even so it's not such a resouce hog just do it on the players turn, but check to see if the player owns the towns first if he doesn't own anyone of them then that check will fail and the tree will end, then for the last couple check you can check if the badguy is dead and run run a message for that possibability, saying you found "badguy's corpse", or if he's not dead but in prision you can run a different script where he give a big speal before you behead him. here's a simplified tree

if Red Player owns the town named "town1"
if Red Player owns the town named "town2" then
if Red Player owns the town named "town3" then
if Red Player owns the town named "town4" then
if Red Player owns the town named "town5" then
if Hero named "badguy" is dead then
Display "you found Badguys corpse today beaten to a pulp, you feel a bit bad because you didn't get to do it yourself"
Red Player Wins
else
if Hero named "badguy" is in prison then
Display "you have finally conquored Badguy and all of his armies, as you take him up to the gallows he give some long winded speech, it abruptly ends ind a gurgle as the switch is thrown, and he drops like a pile of bricks."
Red Player Wins


Return to “Heroes I-IV”

Who is online

Users browsing this forum: No registered users and 26 guests