Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
10 years ago
Auto-translated
Forgot. There, you also need to add the line `consoleCmd('enable_cheats')` before everything, and possibly add a pause.
10 years ago
Auto-translated
I added it in advance)))

Added 1 minute ago
I have ideas for campaigns, but I can't bring them to life. My imagination is very vast, but that's not relevant to the topic.
In reply to xxxRustamxxx
User Avatar
9 years ago
Auto-translated
Is it possible to add different creatures to the Dwellings?
In reply to maksim-2004
User Avatar
9 years ago
Auto-translated
What script do I need to write so that when another hero enters a region, they immediately head to, for example, a Castle in real time?
In reply to Миша Мазур
User Avatar
9 years ago
Auto-translated
Misha Mazur
What script do I need to write so that when another hero enters a region, they immediately go to, for example, a castle in real time?
Use the forum search; this question has already been asked.
MoveHeroRealTime()
User Avatar
9 years ago
Auto-translated
Can the “Aid” spell be cast on a unit other than an Orc, and without the Blood Skill?
9 years ago
Auto-translated
It seems like it's only possible if you constantly redistribute the skill points and link it to another skill (attack, for example).
In reply to serovoy
User Avatar
9 years ago
Auto-translated
serovoy
It seems that it's only possible by constantly switching between skill upgrades and linking them to another skill (attack, for example).
But that's already a mod. And how to do it with scripts – it's unclear =(
User Avatar
9 years ago
Auto-translated
In MapPropretiesTree, look for the "players" section, and for each player, set "CanBeHumanPlayer" to true (if you want a human player to be able to choose that player number at the start) or false (if not). Also, set "CanBeComputerPlayer" to true (if you want a computer player to be able to play as that player number at the start) or false (if not).
In reply to Ment
User Avatar
9 years ago
Auto-translated
function necro1(hero) if hero=="Berein" then Trigger(REGION_ENTER_AND_STOP_TRIGGER, "castle_gates", nil); SetObjectiveVisible( "obj2", true, PLAYER_1 ); SetObjectiveState ("obj2", OBJECTIVE_ACTIVE); DeployReserveHero("Nur", 149, 12, 0); ChangeHeroStat("Nur", STAT_EXPERIENCE, 14700 * enemy_coef); end; end; function necro_defeated (killed, killer) if killed=="Nur" and killer=="Berein" then SetObjectiveState ("obj2", OBJECTIVE_COMPLETED); SetObjectOwner("castle", PLAYER_1); AddObjectCreatures("castle", CREATURE_183, 3 * coef); AddObjectCreatures("castle", CREATURE_298, 50 * coef); AddObjectCreatures("castle", CREATURE_skeleton_warrior, 100 * coef); AddObjectCreatures("castle", 63, 8 * coef); DeployReserveHero("Gottai", 125, 8, 0); EnableHeroAI("Gottai", true); SetAIHeroAttractor("castle", "Gottai", 2); ChangeHeroStat("Gottai", STAT_EXPERIENCE, 25000 * enemy_coef); end; if killed=="Gottai" and killer=="berein" then DeployReserveHero("Gles", 20, 100, 0); EnableHeroAI("Gles", false); ChangeHeroStat("Gles", STAT_EXPERIENCE, 30000 * enemy_coef); LevelUpHero("berein"); end; if killed=="Gles" and killer=="Berein" then DeployReserveHero("Muscip", 84, 44, 0); EnableHeroAI("Muscip", true); ChangeHeroStat("Muscip", STAT_EXPERIENCE, 75000 * enemy_coef); LevelUpHero("berein"); end; end; Why isn't this script working? When I enter the region, I should receive a quest to kill a mage, and the mage himself should appear! But nothing happens. What should I do?
User Avatar
9 years ago
Auto-translated
if killed=="Nur" and killer=="Berein" then
if killed=="Gottai" and killer=="berein" then
if killed=="Gles" and killer=="Berein" then

I don't like these "if" statements. I really don't.
Maybe they should be written differently.
If killed=="Nur" and if killer=="Berein"
User Avatar
9 years ago
Auto-translated
In the map properties, in the scripts section, clicking "edit script" causes the game to crash. What should I do about this?
User Avatar
9 years ago
Auto-translated
I'm editing scripts in Notepad...
In reply to maksim-2004
User Avatar
9 years ago
Auto-translated
maksim-2004
Is it possible to add different creatures to dwellings?
Just take a dwelling with the creatures you need, go to Shared, and paste the Model and AnimSet of the dwelling whose model you need there.

Statistics

Welcome our newest member: recijeb