TOE - combat scripts
TOE - combat scripts
How do you use combat scripts for a combat between 2 heroes? I want to have a script to summon creatures into the battle. I have done this for a neutral stack by putting the SUMMON command in the script for the creature. However, I don't see where to put this script for a hero/hero combat. Any advice?
I have opposite problem, actually I don't know how to script neutral stack to spawn additional creatures gradualy.
When facing hero I can use DefenderHeroMove function, but have no idea how to apply it to pack of Treants.
Is there any source where combat scripts are described, or just listed?
When facing hero I can use DefenderHeroMove function, but have no idea how to apply it to pack of Treants.
Is there any source where combat scripts are described, or just listed?
VCMI : the future of Heroes 3!
People just don't care.
People just don't care.
You mean the functions? They are in the Script Functions Manual ("HOMM5_A2_Script_Functions.pdf" in "Editor Documentation" folder)Warmonger wrote:Is there any source where combat scripts are described, or just listed?
No matter how powerful one becomes, there is always someone stronger. That's why I'm in a constant pursuit of power, so I can be prepared when an enemy tries to take advantage of me.
There is NO description of things like CastSpell or DefenderHeroMove which appears in H5 final battle and gives pretty nice possibilities.
These functions need to refer to some objects and trigger at right moment, as such their use is close to zero.
For example GetDefenderCreatures () returns nil array => :wall.
These functions need to refer to some objects and trigger at right moment, as such their use is close to zero.
For example GetDefenderCreatures () returns nil array => :wall.
VCMI : the future of Heroes 3!
People just don't care.
People just don't care.
You can create 'events' with the sleep command.
Like
Like
Code: Select all
local loop = 1
while loop == 1 do
sleep(4)
if the_ending_condition then
loop = 0
end
-- events follow here (if blabla, else blabla, etc)
end
No matter how powerful one becomes, there is always someone stronger. That's why I'm in a constant pursuit of power, so I can be prepared when an enemy tries to take advantage of me.
The problem is that there is actually no condition I could base on, no turn counter or whatever.
I tried to use AttackerHeroMove as a clock, but for human-controlled hero it gives 100+ iterations before I get control.
Never seen a billion of Warlords before
It worked when I put in the function, however this way hero skips his turn with no act at all.
I tried to use AttackerHeroMove as a clock, but for human-controlled hero it gives 100+ iterations before I get control.
Never seen a billion of Warlords before
It worked when I put
Code: Select all
return not nil;
VCMI : the future of Heroes 3!
People just don't care.
People just don't care.
Who is online
Users browsing this forum: No registered users and 0 guests