Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to Ment
User Avatar
14 years ago
Auto-translated
Ment
No, it's needed for the combat tutorial mode. The combat functions are best viewed in data.pak/scripts/combat-startup.lua. Oh, well, you probably looked there.

yes, thanks, I'll keep that in mind

Added 1 minute ago
JonnyP
Yeah, I'm not very familiar with combat scripts - they're just too 'fickle'. It seems to be correct. Maybe you could try deleting the creature through a variable and summoning a creature on the next turn?!

interesting idea :smile01: I'll definitely try it (experiment a bit) thanks!

Added 1 hour 1 minute ago
JonnyP, your method works :) (I made it so that creatures are resurrected on the next turn of any creature/hero/machine) and now it looks great visually, thanks again for the idea.
User Avatar
14 years ago
Auto-translated
Hello. As I understand it, you can't use two identical heroes in scripts under different names, right? For example: if you have Alaric, and you give two Alarics on the map different names in the "name" tab in the object settings tree, Alaric still remains Alaric. Regarding the fact that you can create two identical heroes by making an exact copy of the hero and giving it a different name in the "shared" section... I know, it's not a good option. P.S. I would like to be able to simply change the name; before, there was no need to use cloned heroes in scripts, and I always thought that the script name in "shared" was given by default, but if necessary, it can be changed by simply setting the "name" in the hero's settings tree.
User Avatar
14 years ago
Auto-translated
I don't know any other way. The script will actually work, but I have no idea what principle it will use to choose a hero. I'm afraid it will be an unpredictable script.
User Avatar
14 years ago
Auto-translated
it selects the first unit placed on the map, and if you assign a different name to the second one, it simply displays an error message saying that the hero was not found. Well, I guess it's clear, I just wanted to make sure.
In reply to KioM
User Avatar
14 years ago
Auto-translated
KioM
selects the first hero placed on the map, and if you assign a different name to the second one, it simply displays an error saying that the hero was not found... well, it's understandable, I just asked to be sure.
KioM
For example: there is Alaric, if you give two Alarics on the map different names in the "name" tab in the object settings tree, Alaric still remains Alaric)
You need to assign a script name to the hero (set in Shared), and not the object name of the hero. This is what is used to reference the hero. The object name set will not change the script name.
In reply to Dyrman
User Avatar
14 years ago
Auto-translated
How does WarpToMap work?
In reply to Олегарх
User Avatar
14 years ago
Auto-translated
Oligarch
How does WarpToMap work?

I couldn't get it to work. I took two maps, put them in one archive, and sent the command to launch the second map in the first map with player 1, but it just kicked me back to the main menu.

P.S. I think it could be used to create a multi-episode multiplayer game :smile20: or, for example, there's a map that's already fully built and can't be used for anything; with the command, you could move a hero to another map where they can play out some kind of story (for example, send a hero to the same map but in the past (in the scenario), and mechanically the hero will go to a new map that is identical to this one but with new features :smile13:).
In reply to Олегарх
14 years ago
Auto-translated
Oligarch
How does WarpToMap work?
I'm also curious about how it works. It's unclear how to specify the map name – that is, what name to write in the function. I tried it – it runs (I don't remember exactly, it was a while ago, and I don't remember how I got it to work), and it's also unclear how it behaves with modified maps.
P.S.: If the function could be made to work correctly, it would be ideal for combining heavily modified maps into a single campaign. Unfortunately, it's not yet possible to combine maps with mods into a campaign.
User Avatar
14 years ago
Auto-translated
heavily modified
If I understand correctly what you're talking about, then no, it wouldn't be suitable. Modified maps interact with each other perfectly well, even if they are simply located together in the maps folder; it is not necessary for them to be in the same campaign.
In reply to Ment
14 years ago
Auto-translated
Ment
If I understand correctly what we're talking about, then no, it wouldn't be a good fit. Modified maps interact well with each other, even if they are simply located together in the maps folder; they don't necessarily have to be in the same campaign.
I meant that the modifications would be different. The influence of one map on another is not a bad thing; in principle, you can take all of this into account in the maps and avoid unnecessary additions.
User Avatar
14 years ago
Auto-translated
Do you mean to make mods compatible with each other? Well, what prevents simply combining them into one campaign using the old method? :)
In reply to Ment
14 years ago
Auto-translated
Ment
Do you mean to make mods compatible with each other? Well, what prevents combining them into a campaign using the old method? :)
Yes. The problem is adding custom objects and textures... although, I'm not sure, since maps with mods aren't visible through the regular Create Campaign, maybe it's possible to combine them by tinkering with the files.
User Avatar
14 years ago
Auto-translated
Yes, no problem at all.
In reply to Ment
14 years ago
Auto-translated
Ment
No problem at all, actually.
I wanted to ask something else: will the combat script lose its way? And do I need to create a separate combat script for each map, or is one combat script sufficient for all maps?
User Avatar
14 years ago
Auto-translated
You can have one, or you can have a different one for each. It all depends on where you place the links.

Statistics

Welcome our newest member: recijeb