|
Thread: Is it possible to detect owner of dwelling? | |
|
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.
|
|
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.
____________
|
|
vulcancolak
Famous Hero
|
posted September 13, 2021 08:29 AM |
|
|
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.
|
|
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.
____________
|
|
vulcancolak
Famous Hero
|
posted September 14, 2021 07:34 AM |
|
|
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.
|
|
|