Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
Please advise. I have many identical objects on my map, and a hero can buy creatures from them using a script. The object names are: "dw1", "dw2", "dw3", etc. Is it possible to assign the same trigger to all of them, so that the function receives the object number as a parameter, representing the object the hero entered, as a number. Then, I could define the type, quantity, and cost of creatures for each object using an array.
for i=1,15 do Trigger(OBJECT_TOUCH_TRIGGER,"dw"..i,"dwellingF") end;
function dwellingF(hero, obj_name) n=<how do I get the object number here?> AddHeroCreatures(hero,cr_type[n],cr_count[n]) SetPlayerResource(1,GOLD,GetPlayerResource(1,GOLD)-cr_count[n]*cr_cost[n]); end;
Создается карта про эльфов: Воссоединение - готовность 71%