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

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

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

Post by Badnorth »

Like the topic title, is there a trigger that locks a tech or unit?
Or disables them, removing them from production or research.
For newcomers, click here for discord links. Hopefully they aren't expired.
User avatar
Hyuhjhih
Posts: 1301
Joined: Sat Sep 19, 2020 4:22 am
Location: Earth, (the part of blue ball and is named India for some reasons)

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

Post by Hyuhjhih »

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

Design leader of the variants Age of Gods and Age Of Civilization, and live heartedly contributing to AoS.

AoC discord server is up AoC
User avatar
Badnorth
Posts: 4121
Joined: Mon Apr 20, 2020 2:22 pm

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

Post by Badnorth »

That one? I see. Thanks!
For newcomers, click here for discord links. Hopefully they aren't expired.
User avatar
Badnorth
Posts: 4121
Joined: Mon Apr 20, 2020 2:22 pm

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

Post by Badnorth »

@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.
For newcomers, click here for discord links. Hopefully they aren't expired.
User avatar
Hyuhjhih
Posts: 1301
Joined: Sat Sep 19, 2020 4:22 am
Location: Earth, (the part of blue ball and is named India for some reasons)

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

Post by Hyuhjhih »

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

Design leader of the variants Age of Gods and Age Of Civilization, and live heartedly contributing to AoS.

AoC discord server is up AoC
User avatar
Badnorth
Posts: 4121
Joined: Mon Apr 20, 2020 2:22 pm

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

Post by Badnorth »

I didn't.
For newcomers, click here for discord links. Hopefully they aren't expired.
User avatar
Hyuhjhih
Posts: 1301
Joined: Sat Sep 19, 2020 4:22 am
Location: Earth, (the part of blue ball and is named India for some reasons)

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

Post by Hyuhjhih »

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.

Design leader of the variants Age of Gods and Age Of Civilization, and live heartedly contributing to AoS.

AoC discord server is up AoC
User avatar
Hyuhjhih
Posts: 1301
Joined: Sat Sep 19, 2020 4:22 am
Location: Earth, (the part of blue ball and is named India for some reasons)

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

Post by Hyuhjhih »

@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.

Design leader of the variants Age of Gods and Age Of Civilization, and live heartedly contributing to AoS.

AoC discord server is up AoC
User avatar
Badnorth
Posts: 4121
Joined: Mon Apr 20, 2020 2:22 pm

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

Post by Badnorth »

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 :)
For newcomers, click here for discord links. Hopefully they aren't expired.
User avatar
Endru1241
Posts: 2717
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 »

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: 2717
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 »

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”