Shiroyasha2910, regarding combat scripts, there is an excellent guide from the respected }{0TT@6bI4: combat scripts - guide
And regarding your idea, I haven't done anything like that myself yet, but as I see it, you should try using the HasHeroSkill() function, and save the result in a variable using the SetGameVar() function, and then retrieve it in the combat script file using GetGameVar(). There might be another way, but this seems to be the most obvious one.
Posts from Scripts
Good evening. I'm trying to figure out combat scripts, but so far without success. I saw someone here mention that there's a guide to combat scripts; could someone provide a link to it? Because I couldn't find it.
Is it also possible for someone to help create the necessary script? If it's possible, of course. The idea is this: when a battle starts and the hero has the "Ash's Blessing" skill, 3 archangels appear on the battlefield.
First, the guide is in the message from IchGViji).
Second, something like that is probably possible, but in terms of the story, it seems wrong to me. The Angel Protector is Elrath, not Ash. And 3 archangels at the beginning is a bit too much.
Good evening. I renamed the objects using a standard script. However, for some reason, not all objects were renamed; in x = 2, absolutely everything was renamed. In x = 1, 3, and 4, only some objects were renamed.
I thought that maybe there are duplicate object names somewhere, but no, the names are unique. What else could be causing this problem?
for i = 118,132 do -- reinforcement in the dungeon (first)
for x = 1,4 do
OverrideObjectTooltipNameAndDescription('PortalP'..x..'_'..i,"Maps/Multiplayer/JoyPatriot/Teks/Portal/ReinforcementsName.txt",
"Maps/Multiplayer/JoyPatriot/Teks/Portal/ReinforcementsBio.txt")
end
end
Good evening. I renamed the objects using a standard script. However, for some reason, not all objects were renamed; in x = 2, absolutely everything was renamed. In x = 1, 3, and 4, only some objects were renamed.
I thought that maybe there are duplicate object names somewhere, but no, the names are unique. What else could be causing this problem?
for i = 118,132 do -- reinforcement in the Dungeon (first)
for x = 1,4 do
OverrideObjectTooltipNameAndDescription('PortalP'. .x..'_'..i,"Maps/Multiplayer/JoyPatriot/Teks/Portal/ReinforcementsName.txt",
"Maps/Multiplayer/JoyPatriot/Teks/Portal/ReinforcementsBio.txt")
end
end
Also, I recommend not hardcoding absolute paths to map files; it's better to use the GetMapDataPath() function. This will save you from having to rewrite all the paths if you decide to rename the map.
P.S. What objects are you renaming? If they are creatures, try using the SetMonsterNames() function
Doesn't the console say anything?
Also, I recommend not specifying absolute paths to map files; it's better to use the GetMapDataPath() function. This will save you from having to rewrite all the paths if you decide to rename the map.
P.S. What objects are you renaming? If it's creatures, try the SetMonsterNames() function.
The console doesn't say anything about it.
The console doesn't output anything regarding this.
The OverrideObjectTooltipNameAndDescription function doesn't work with all object types; some of them cannot be renamed using it. For creatures, there is a separate function mentioned in the message above.
What types of objects do you want to rename: creatures, dwellings, or something else?
The OverrideObjectTooltipNameAndDescription function doesn't work with all object types; some of them cannot be renamed using it. There is a separate function for creatures, as mentioned in the message above.
What types of objects do you want to rename: creatures, dwellings, or something else?
This is all for a one-way portal.
This is all for a one-way portal.
Interesting 🤔... In principle, for one-way portals, you can rewrite their names and descriptions. My only assumption so far is that the necessary objects are located somewhere else, and instead of them, there are ordinary portals (if you say that the console doesn't complain and absolutely all objects have different names, because 60 objects are renamed).
Okay, let's assume that I'll review it again, maybe I missed something during the check.
Does anyone else know if it's possible to change the command for a hero using scripts? That is, there is a hero of player 2 on the map, he does something, and through a script, he becomes a hero of player 3. Is something like this possible? I haven't been able to find anything similar in the scripts yet.
Okay, let's say I'll just review it again, maybe I missed something during the check.
Does anyone else know if it's possible to change a hero's allegiance using scripts? For example, there's a hero belonging to player 2 on the map, they do something, and a script changes their allegiance to player 3. Is something like that possible? I haven't been able to find anything like that in the scripts yet.
It's simple - SetObjectOwner(heroname, teamnumber)
Hello. I'm already racking my brain trying to figure out how SetHeroLootable and IsHeroLootable work.
I tried IsHeroLootable(“heroname”, nil)
I tried SetHeroLootable(“heroname”, nil)
SetHeroLootable(“heroname”, disable)
No matter what I do, the hero's artifacts are still being taken away.
Can you tell me what I'm doing wrong?
Hello. I've already broken my head trying to figure out how SetHeroLootable and IsHeroLootable work.
I tried IsHeroLootable("heroname", nil)
I tried SetHeroLootable("heroname", nil)
SetHeroLootable("heroname", disable)
No matter what I do, the hero's artifacts are still being taken away.Can you tell me what I'm doing wrong?
If you want to perform a check, use IsHeroLootable("HeroName").
It's simple – if you want to prevent artifacts from being taken from a hero, use SetHeroLootable("HeroName", nil).
If you want to implement a check, use IsHeroLootable("HeroName").
I tried SetHeroLootable, but it didn't work. I have two types of battles that are launched through a script, where the heroes have artifacts. One battle is launched through StartCombat, and the other is SiegeTown. In both cases, when I defeat the heroes, I receive their loot.
Maybe I need to write it in a separate function? Because I just put it in the general map code.
I tried SetHeroLootable, but it didn't work. I have two types of battles that are launched through a script, where the heroes have artifacts. One battle is launched through StartCombat, and the other is SiegeTown. In both cases, when I defeat the heroes, I get their loot.Maybe I need to write it in a separate function? Because I just put it in the general code of the map.
Put this script at the very beginning of your code; maybe it will work.
Statistics
Users Online 9 users 1321 guests
Today's Visitors 31
- ALVYDAS
- Arandor
- AstralLein
- burymm
- Dark Jack
- dotahcxun
- elizbar1967
- fktifzobr@mail.ru
- Golvek
- Happy Life
- Heroist
- Hottler
- HwKeeper
- IchGViji
- kcfgogbfalgfl
- LifeForm
- Narron
- OrnsteinDragonslayer
- PingWing
- Ple-Sen
- Sir Syddan
- Siverfale
- Valery59
- Валера 111
- Граф Орлов
- Джек
- Драккошка
- Дугал
- Злобный Ящур
- Нэйко
- Саргон