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: Is it possible to detect owner of dwelling?
Thread: Is it possible to detect owner of dwelling?
vulcancolak
vulcancolak


Famous Hero
posted September 12, 2021 07:15 PM

Is it possible to detect owner of dwelling?

Hello everyone. I am trying to detect ownership of dwellings and give action about that every x day.

Is it possible or not? I have to detect specific dwellings owners and give the bonus to owners for every 2 days.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted September 13, 2021 05:29 AM

You can, but only in the dwelling itself. This was one of my first mapping scripting stuff way back in like 2006...

Essentially you make an event at the dwelling, that has "trigger only if owner is..."

These can only be triggerable events, so you need to make a daily (or so) whole map event that triggers it indirectly.

Each dwelling needs its own script applied.
____________

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


Famous Hero
posted September 13, 2021 08:29 AM
Edited by vulcancolak at 08:30, 13 Sep 2021.

But dwellings doesn't have a "Captured" or "Timed" events and i don't know how to use variables in this game. Here is the picture for the entire scenario.


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


Responsible
Legendary Hero
Modding the Unmoddable
posted September 14, 2021 01:35 AM
Edited by NimoStar at 01:45, 14 Sep 2021.

Then the question you should ask yourself first is "how to use variables"

Anyways, there is no action to add recruitable creatures at a dweeling, just at town.

The thing you can do is "change owner".

In timed events, you can use the "Trigger custom event" effect (or I don't know the name) to trigger any event in map objects which don't have daily ones, like mines and dwellings.

Anyways I think that what you want to do if it's a free vampire created at town is possible, but you need variables.

Day 2 event (global timed, repeat every 3 days):
event that activates VAMPIRETRIGGER1 (in object) Only activates for the player that would have the bonus and sets VAMPIRPLACE to TRUE.
Then, VAMPIRETRIGGER2 (in object) is activated for any other player as owner and sets VAMPIRETRIGGER to FALSE.

Day 3 event (at town timed, repeat every three days):
If variable VAMPIREPLACE is true, give 1 vampire to owner.
____________

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


Famous Hero
posted September 14, 2021 07:34 AM
Edited by vulcancolak at 08:29, 14 Sep 2021.

I am developer of many Warcraft III maps, created many maps since 2002 and few months ago i have created AI system for my complex MOBA game. I know how the variables works but i don't understand how to set and check variables in this editor. Check the picture please. If we have to use Boolean instead of Integer and even if it works, how to detect owner of the dwelling?




PS: I know my Heroes 4 trigger won't work because i was thinking "how to detect owner of dwelling" and

ps: OTOYARATIK2 should be checking the boolean everyday instead of every 2 days i know. But still i have to detect owner of dwelling.

Still i am working and thinking about it, i will let you know when i made progress.

Update: Ok ok it seems i can handle the action part. I just need to detect owner of the building as the title says.
Update2: I have succeed but my method is flawed. I am working on improvements. But still waiting for help.

 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.0215 seconds