Skip to content
User Avatar
#222
Auto-translated
If you need the second function to execute only after the first creatures have been hired, you can replace "nil" with "Naim2" in the trigger under the condition "if gold >= 3000 then". This is how it would look:

...
if gold >= 3000 then
Trigger(OBJECT_TOUCH_TRIGGER, "Tavern", "Naim2")
SetPlayerResource(PLAYER_1, GOLD, gold - 3000)
AddHeroCreatures(Naim1_hero, 4, 30)
else ...
And remove Trigger(OBJECT_TOUCH_TRIGGER, "Tavern", "Naim2") at the very end.
In this case, the trigger for "Naim1" will be activated at the beginning, and after hiring, it will be replaced with "Naim2", and after hiring the second set of creatures, it will be reset.

Statistics

Welcome our newest member: leyu