Jump to content

Need help with a Heroes 4 Script


Stahlvormund101

Recommended Posts

Hey guys and gals,

 

the HoMM 4 forums I found seem a bit extinct to me and I didnt want to get another account on a forum, so I ask here.

 

I created a map where I have a town that is neutral at the start. Once you capture it, it should have an Event that gives the garnison of that town 1 Megadragon at the first day of the first week every month.

 

I went into the towns Event section and chose "Continuous Events" with the following conditions:

 

It runs whoever owns the town and in every turn.

No separate message or added ressources.

The script I tried is:

 

Conditional Action

  If

    Current week of the Month Equals = 1

       And

          Current day of the Week Equals = 1

             And

                Owner is Red Player

Then

     Sequence

          Add 1 Megadragon to Garnison with message

          Remove Script

Else

     Do Nothing

 

This resulted in the Script running at the next time it is the first day of the first week after you capture the town, but it wont continue.

I then tried:

 

Conditional Action

  If

    Current week of the Month Equals = 1

       And

          Current day of the Week Equals = 1

             And

                Owner is Red Player

Then

     Sequence

          Add 1 Megadragon to Garnison with message

          Do Nothing

Else

     Do Nothing

 

This resulted in the Script running at the next time it is the first day of the first week after you capture the town, but it will give another creature everytime you do an action that day, so it gives several creatures which it isnt supposed to do.

Next try was:

 

Conditional Action

  If

    Current week of the Month Equals = 1

       And

          Current day of the Week Equals = 1

             And

                Owner is Red Player

                  And

                    Number of Megadragons in Garnison is Less than 1

Then

     Sequence

          Add 1 Megadragon to Garnison with message

          Do Nothing

Else

     Do Nothing

 

This resulted in the Script running at the next time it is the first day of the first week after you capture the town, but it will give another creature when you remove the Megadragon from garnison.

Last try was a Triggerable Event in the town:

 

Conditional Action

  If

    Current week of the Month Equals = 1

       And

          Current day of the Week Equals = 1

             And

                Owner is Red Player

Then

     Sequence

          Add 1 Megadragon to Garnison with message

          Do Nothing

Else

     Do Nothing

 

But this did nothing at all.

 

I already scoured HoMM 4 Script threads, but none of them helped. I'd be very helpful for any advice.

 

Kind regards, Stahlvormund101

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use