Hello people.
I spent a lot of time on the editor of the Age of Kings when I was in middle school (I had much fun re-creating the William Wallace campaign using the official voices) and here I am again with the DE.
I want a trigger to react when a unit is being trained in a building (I’m having fun re-creating a tutorial campaign on AoE II DE: RoR). To take the simplest example: when the player clicks the villager button, I want effects to happen.
So I tried to use the condition “Object Has Action”.
Trigger “Villager Creation”:
- Condition “Object Has Action”:
I clicked on “Set Object”, then clicked on the Town Center. For “Unit AI Action”, I selected “Train”. So I expect the condition to trigger when the player adds a Villager to the Town Center’s queue and thus making it being in the “Train” state (I don’t know how precisely it is coded so don’t hesitate to correct me for the vocabulary and all). - Effect “Display Instruction”, saying something like “Well done, you’re so great! Oh my God, let’s make a party to celebrate that”.
But nothing happens when I test and click on “Create a Villager”. My other triggers work fine.
Is it because I put nothing for “Next Object”? But the condition turned green so I guess it’s not needed.
I search on the internet and on this forum, and I found nobody talking specifically about the “Train” action for Object Has Action. And it seems it could work even without selecting any unit (by using the “Object List/Group/Type” selection lists) but only using scripts (it goes red until with select a unit for the “Set Object”), based on that website: Functions - AoE2DE UGC Guide.
EDIT:
I tested other Actions with the Town Center and the Villager and some worked (Move, Hunt), other didn’t (Enter and Unload, for example). I’m not sure how the Actions Enter, Train and Unload should be used (maybe it works only on transport ships for the latter).