Is there a trigger that locks a tech or unit? ANSWERED

Post Reply
User avatar
Badnorth
Posts: 3875
Joined: Mon Apr 20, 2020 2:22 pm
Location: Earth

Is there a trigger that locks a tech or unit? ANSWERED

Post by Badnorth » Fri Apr 23, 2021 6:45 am

Like the topic title, is there a trigger that locks a tech or unit?
Or disables them, removing them from production or research.
Something. Something.

User avatar
Hyuhjhih
Posts: 1163
Joined: Sat Sep 19, 2020 4:22 am

Re: Is there a trigger that locks a tech or unit?

Post by Hyuhjhih » Fri Apr 23, 2021 7:13 am

Cond: Any ; eff: remove Objtype from buildables for PlayerN
LIE = Love Is Eternal.

Working on the variants Age of Gods and Civilization Age, and live heartedly contributing to AoS.
Am i feeling my self a nuisance here?🤔

User avatar
Badnorth
Posts: 3875
Joined: Mon Apr 20, 2020 2:22 pm
Location: Earth

Re: Is there a trigger that locks a tech or unit?

Post by Badnorth » Fri Apr 23, 2021 7:22 am

That one? I see. Thanks!
Something. Something.

User avatar
Badnorth
Posts: 3875
Joined: Mon Apr 20, 2020 2:22 pm
Location: Earth

Re: Is there a trigger that locks a tech or unit? ANSWERED

Post by Badnorth » Sat Apr 24, 2021 5:00 am

@Hyuhjhih Can you test the Remove Obj type from buildables of player nr?
It doesn't seem to work for me. Well, it works but when i use it all of my buildables goes null.
Something. Something.

User avatar
Hyuhjhih
Posts: 1163
Joined: Sat Sep 19, 2020 4:22 am

Re: Is there a trigger that locks a tech or unit? ANSWERED

Post by Hyuhjhih » Sat Apr 24, 2021 5:02 am

Did you used eff: clear all buildables ?
LIE = Love Is Eternal.

Working on the variants Age of Gods and Civilization Age, and live heartedly contributing to AoS.
Am i feeling my self a nuisance here?🤔

User avatar
Badnorth
Posts: 3875
Joined: Mon Apr 20, 2020 2:22 pm
Location: Earth

Re: Is there a trigger that locks a tech or unit? ANSWERED

Post by Badnorth » Sat Apr 24, 2021 5:30 am

I didn't.
Something. Something.

User avatar
Hyuhjhih
Posts: 1163
Joined: Sat Sep 19, 2020 4:22 am

Re: Is there a trigger that locks a tech or unit? ANSWERED

Post by Hyuhjhih » Sat Apr 24, 2021 5:57 am

I just checked. Wierd, the cond: remove objtype to buildables for PlayerN is acting like clear all buildables for PlayerN and is overriding add all default buildables for PlayerN. while add obj type to buildables is working fine.

A recent bug? @Endru1241
Last edited by Hyuhjhih on Sat Apr 24, 2021 1:51 pm, edited 1 time in total.
LIE = Love Is Eternal.

Working on the variants Age of Gods and Civilization Age, and live heartedly contributing to AoS.
Am i feeling my self a nuisance here?🤔

User avatar
Hyuhjhih
Posts: 1163
Joined: Sat Sep 19, 2020 4:22 am

Re: Is there a trigger that locks a tech or unit? ANSWERED

Post by Hyuhjhih » Sat Apr 24, 2021 6:05 am

@Badnorth
A temp solution is
Cond: any
Eff: add all default buildables to PlayerN
Eff: remove objtype from buildables to PlayerN.

In the same order.

GLHF
LIE = Love Is Eternal.

Working on the variants Age of Gods and Civilization Age, and live heartedly contributing to AoS.
Am i feeling my self a nuisance here?🤔

User avatar
Badnorth
Posts: 3875
Joined: Mon Apr 20, 2020 2:22 pm
Location: Earth

Re: Is there a trigger that locks a tech or unit? ANSWERED

Post by Badnorth » Sat Apr 24, 2021 6:40 am

Hyuhjhih wrote:
Sat Apr 24, 2021 6:05 am
@Badnorth
A temp solution is
Cond: any
Eff: add all default buildables to PlayerN
Eff: remove objtype from buildables to PlayerN.

In the same order.

GLHF
Thanks :)
Something. Something.

User avatar
Endru1241
Posts: 1581
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Is there a trigger that locks a tech or unit? ANSWERED

Post by Endru1241 » Sat Apr 24, 2021 6:09 pm

I noticed it few days ago, but I thought it was only in old tmx maps.

Nothing in assets affects trigger definition, so only stratego could check it in the code.

Edit: no reason to mention him - I asked through e-mail.
Age of Strategy design leader

User avatar
Endru1241
Posts: 1581
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Is there a trigger that locks a tech or unit? ANSWERED

Post by Endru1241 » Sat Apr 24, 2021 9:14 pm

I got an explanation and I'll change help file to better fit how it really works.
This:
Hyuhjhih wrote:
Sat Apr 24, 2021 6:05 am
Cond: any
Eff: add all default buildables to PlayerN
Eff: remove objtype from buildables to PlayerN.

In the same order.

GLHF
Is not a temporary solution - it's how it really works.
Each map has list of permitted units parameter.
Normally it's null (list doesn't exist) and engine uses all (default) in that case.

If you try to remove objtype from null - it creates a list (to prevent nullException I assume) and tries to remove id of this unit - so empty list is left, ergo nothing to build/train.
Btw. Adding shouldn't work normally - it clears the list too, so only added units are buildable.
Age of Strategy design leader

Post Reply

Return to “More Q&A”