Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Heroes 4 - Lands of Axeoth > Thread: Detect if player has no towns
Thread: Detect if player has no towns
vulcancolak
vulcancolak


Famous Hero
posted August 17, 2021 12:25 PM
Edited by vulcancolak at 13:17, 17 Aug 2021.

Detect if player has no towns

Hello everyone. Is there a good method to do that? I found the way to detect that but it looks painful. Negate and Minus variables when everytime specific players captures or loses towns.

We want to make specific players to defeat if they don't have any towns for x days OR instantly.

At least i was tried to find Player Owns Certain town is True of False. Because i was planning to do something like this.
Everytime it runs and checks player owns town named 1 false, town 2 false bla bla if all of these false, that means defeat the player.

I am not talking about the standart victory condition when you get all towns your enemy must get any town within 3 days. We are playing with 6 players, capturing towns of AI and dear idiot AI roaming the map with few units and we are trying to find and defeat him.

___________________________________________
Edit: I found a solution but it is instant.
Here is the event if you need.

1-) Simply give name all of the towns.
2-) Make it run every day separately for every player
3-) Conditional action.
If the red player owns town named 1
OR
If the red player owns town named 2
OR
If the red player owns town named 3
Then - Do Nothing
Else - Defeat

You have to add every town in here. Event is checking for "OR" that means if the player doesn't own any of these towns = defeat

Alternatively you can make it run weekly.
Edit 2: Just realized, we can make it work for current player. No need to make it for specific players.
Edit 3: What? Action > Lose and game says it is defeated but still it's hero and army exists into the map? And still he is able to play for few steps when it's first turn
___________________________________________


But still i am looking for making it for specific days. When player doesn't have any of the towns, countdown starts.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Honorable
Supreme Hero
Modding the Unmoddable
posted August 29, 2021 06:45 AM

Countdown needs to be separate events like giving a message and "you only have 3 days", etc. Each day has to be another event that triggers the next one (via activating a variable)

Conquering a town should reset the variables.
____________
https://www.moddb.com/mods/greatest-mod

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
vulcancolak
vulcancolak


Famous Hero
posted September 03, 2021 10:17 AM

But i don't know how to do that.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Honorable
Supreme Hero
Modding the Unmoddable
posted September 04, 2021 06:28 AM

You need like three variables for players and set it to true or false.

Like

Set true->Day 1 purple no towns
Set true->Day 2 purple no towns
Set true->Day 3 purple no towns -> Lose

And triggered events on player conquering town, that check for each possible player and set all those to FALSE

Kinda work.
____________
https://www.moddb.com/mods/greatest-mod

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
vulcancolak
vulcancolak


Famous Hero
posted September 13, 2021 08:32 AM

Can you show me how to do that? Because in this game i don't understand how the variables works.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Red_White
Red_White

Tavern Dweller
posted September 30, 2021 05:53 PM

NimoStar said:
You need like three variables for players and set it to true or false.

Like

Set true->Day 1 purple no towns
Set true->Day 2 purple no towns
Set true->Day 3 purple no towns -> Lose

And triggered events on player conquering town, that check for each possible player and set all those to FALSE

Kinda work.


This is standard condition of winning in H4.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
NimoStar
NimoStar


Honorable
Supreme Hero
Modding the Unmoddable
posted September 30, 2021 06:57 PM

Don't blame me, that's what Vulcan asked for :v
____________
https://www.moddb.com/mods/greatest-mod

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
vulcancolak
vulcancolak


Famous Hero
posted October 08, 2021 01:57 PM

Red_White said:
NimoStar said:
You need like three variables for players and set it to true or false.

Like

Set true->Day 1 purple no towns
Set true->Day 2 purple no towns
Set true->Day 3 purple no towns -> Lose

And triggered events on player conquering town, that check for each possible player and set all those to FALSE

Kinda work.


This is standard condition of winning in H4.


So why computer can roam around the map for 30+ days without no towns? Still i don't know how to make it.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0261 seconds