[solved] Unit visibility check

Discussion of Lua and LuaWML support, development, and ideas.

Moderator: Forum Moderators

Post Reply
User avatar
ZombieKnight
Posts: 243
Joined: June 27th, 2022, 2:26 pm
Location: Czech Republic

[solved] Unit visibility check

Post by ZombieKnight »

Hi,
Do you know how to check if my_unit is visible for the side=1?
Thanks.
Last edited by ZombieKnight on May 3rd, 2024, 12:12 pm, edited 1 time in total.
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
User avatar
lhybrideur
Posts: 373
Joined: July 9th, 2019, 1:46 pm

Re: Unit visibility check

Post by lhybrideur »

[filter_vision]
User avatar
ZombieKnight
Posts: 243
Joined: June 27th, 2022, 2:26 pm
Location: Czech Republic

Re: Unit visibility check

Post by ZombieKnight »

lhybrideur wrote: May 3rd, 2024, 9:34 am [filter_vision]
In [have unit]?
That ignores hp=0 units in last breath events.

I want to add visibility filter to some more parameters of unit.get.
How to do so?
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
User avatar
Ravana
Forum Moderator
Posts: 3061
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Unit visibility check

Post by Ravana »

Dont use have_unit then, use filter_vision.
User avatar
ZombieKnight
Posts: 243
Joined: June 27th, 2022, 2:26 pm
Location: Czech Republic

Re: Unit visibility check

Post by ZombieKnight »

Thanks, I see.
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Post Reply