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.
Yes, everything is done as described, thank you for the answers. In multiplayer, delays were necessary, and they had to be placed after the required script functions. Unlike single-player, the delay had to be increased by another 1, and the order of resetting triggers and calling functions had to be changed. This allowed the cross-trigger functions to work in multiplayer (in single-player, everything worked well, albeit with some errors). Testing will show how stable this is. Play through the campaign? ))
where "light" is the script name of the object, "light1" is the region, and "lightF" is the function itself. What's wrong with my function? Please help. Thank you in advance.
Added after 40 seconds There's a tab before setobject.
Thank you. I didn't know about the movable objects. But the problem still isn't solved. Let me explain in more detail. I need the hero to stand in a region when approaching a wall in the Dungeon, and the following things should happen: an effect (light) appears on the wall, the region that the hero couldn't walk on is removed, and a secret passage through the wall is opened. How can I script all of this?
Regarding underground walls. You can walk through them if you place a bridge from the Grass folder and bury it using the z-coordinate. It won't be visible, and it will be like an invisible passage.
Thank you, AstralLein and Jack of Shadows, for your help. I have another question. How can I prevent a specific region from revealing the fog of war when a hero approaches it? I need it to remain hidden initially, and then, during a function, it should be able to reveal itself.
Hello. Please, wise people, if you know the answer, let me know! :)
As you remember, in Lords of the North, the Red Knights used this script to transform their units into red ones:
function transformTroops( heroName )
sleep(3);
print("function transformTroops for hero ", heroName ," has started...");
while IsHeroAlive ( heroName ) == true do
for i=1,14 do
creaturesCount = GetHeroCreatures( heroName, i );
if creaturesCount > 0 then
RemoveHeroCreatures( heroName, i, 10000);
n = i;
if mod(i,2) ~= 0 then n = i + 1; end;
AddHeroCreatures( heroName, 105 + (n/2), creaturesCount );
end;
end;
sleep(2);
end;
print("Hero ", heroName, " is dead. Function transformTroops terminated");
end;
I need help with the following: How can I make the function work in reverse, transforming units from red to white? I've tried several times, but it doesn't work. Instead of 1, 14, I put 106, 112, and instead of 105, I put 1... It removes the red units, but spawns completely random units for the hero.
Thank you for your help (if any). :)
Hello. Please, wise people, if you know the answer, help me! :) As you remember, in Lords of the North, the red knights converted their units to red using this script:
function transformTroops( heroName ) sleep(3); print("function transformTroops for hero ", heroName ," has started..."); while IsHeroAlive ( heroName ) == true do for i=1,14 do creaturesCount = GetHeroCreatures( heroName, i ); if creaturesCount > 0 then RemoveHeroCreatures( heroName, i, 10000); n = i; if mod(i,2) ~= 0 then n = i + 1; end; AddHeroCreatures( heroName, 105 + (n/2), creaturesCount ); end; end; sleep(2); end; print("Hero ", heroName, " is dead. Function transformTroops terminated"); end;
I need help with the following: How can I make the function work in reverse, converting from red to white? I've tried many times, but it doesn't work. Instead of 1,14, I put 106, 112, and instead of 105, I put 1... It removes the red ones, but it spawns completely random units for the hero.
Thank you for your help (if any). :)
It should work approximately like this:
function transformTroops(hero) while IsHeroAlive(hero) do sleep(2) for i=106,112 do local n = GetHeroCreatures(hero, i) if n > 0 then RemoveHeroCreatures(hero, i, n) AddHeroCreatures(hero, (i-105)*2, n) end end end end
Is there a command that would make a non-clickable object (stone, tree, bridge, etc.) appear or move to specified coordinates? For example: a hero touches an obelisk, and a part of the bridge appears. The hero must find all the obelisks and, by touching them, the bridge would fully appear, and the passage would be opened.
Is there a command that would make a non-clickable object (stone, tree, bridge, etc.) appear or move to specified coordinates? For example: a hero touches an obelisk, and a part of the bridge appears. The hero must find all the obelisks and, by touching them, the bridge would fully appear, and the passage would be opened.
SetObjectPosition. Just set IsRemovable to true in the object's properties.