Posts from Scripts
I couldn't find an example script anywhere, so I'm posting my problem here:
I need to spawn a hero from the reserve onto the map, but not at a specific point, but inside a town's garrison.
Do you have any ideas on how to do this, and is it even possible?
How can I remove a building? For example, there's a Necropolis on the map that gives the player zombies, and I need to remove it. Usually, to remove an object from the map, like trees, creatures, or anything else, I use RemoveObject, but this script doesn't work on the Necropolis and gives an error.
SetObjectPosition ('Duncan',121,123,-1,4);
AddHeroCreatures("Duncan", 1, 3)
for i=1, 179 do
if GetHeroCreatures('Duncan',i)>=1 then
RemoveHeroCreatures('Duncan',i);
end;
end;
end;
Trigger( OBJECT_TOUCH_TRIGGER, 'PORT_1','portals');
The same error occurs - "Not enough arguments when calling function GetHeroCreatures".
Hello everyone!
Please tell me how to make it so that in the battle function (when a player enters a specific area and fights creatures), it's the player's heroes (Red, Blue, Purple), and not just one specific hero, who engage in battle when entering that zone.