Skip to content

Posts from How to place dead creatures on the map.

No ratings yet — be the first to rate!
User Avatar
15 years ago
Auto-translated
I saw it in the "In the Wake of Gods" campaign, in the second mission, where you need to unite the clans near the shipyard. There was a dead Unicorn and a dead Minotaur lying there. How do I place them on the map?
User Avatar
15 years ago
Auto-translated
You need to add the following line to the script: `PlayObjectAnimation([script name of the monster], "death", IDLE);`
User Avatar
15 years ago
Auto-translated
But I think it will be like a monster that can be attacked, only with the animation of a dead creature.
User Avatar
15 years ago
Auto-translated
Yeah, that’s how it’s done :) To prevent attacks on it, the function SetObjectEnabled([name], nil) is used.
User Avatar
15 years ago
Auto-translated
Thank you for your help.
In reply to ReZehir
User Avatar
15 years ago
Auto-translated
I think I did everything correctly. I entered the script, but when I approach a monster in the game, it dies, but why does it twitch? Or is it supposed to be like that?
User Avatar
15 years ago
Auto-translated
Does it twitch? Does it have convulsions or something? Is the monster dead on the map or not?
In reply to Победитель
User Avatar
15 years ago
Auto-translated
Do you mean it twitches? Does it have convulsions? Is the monster dead on the map or not?
Probably, it has convulsions; I guess the monster knows better. The thing is, I approach the monster with my hero, and it falls and twitches. Maybe the script wasn't written correctly?
I placed the hero next to the monster, and when the map starts, it falls and twitches. Any ideas?
User Avatar
15 years ago
Auto-translated
Actually, this function **plays** the death animation, and if you place the hero next to the creature, it will, of course, twitch. Secondly, some creatures don't have a death animation. Then they will hang in the air with their arms strictly perpendicular to their body.

In general, place the hero **not** next to the monster. Then it will "have time to die" before the hero arrives :D.

Regarding the script: when I was making a test map, I was suggested the following script for creature death:
PlayObjectAnimation ("storm1", "death", ONESHOT_STILL);
Here, "storm1" is the script name of the monster, "death" is the name of the animation, in this case - death (there may be others), and ONESHOT_STILL means that the "corpse" will remain lying there :).
In reply to Победитель
User Avatar
15 years ago
Auto-translated
Every time I moved a character away from a creature, and the character was no longer within its attack range, the creature died, but it was still possible to attack it. Why is that?
And also, how can I make it stay on the map forever?
Thank you for your answer, Pobeditel!

Added 2 minutes later
I didn't notice at the beginning of the topic that there were answers to all my questions... :o :o :o
14 years ago
Auto-translated
Oh, that will be useful for me too.
3 years ago
Auto-translated
I tried it as you described here, but it still doesn't work because the monster remains highlighted, and the arrow still points to it. Basically, it's still a monster, you just can't fight it. I did it this way: I took a developer object – a picture. I left it on the map, went into the shared section, copied the current object that belonged to that picture, and then specified the Model and AnimSet parameters of the monster I wanted for it. And after that, I added the death script described above. As a result, the corpse just lies there, and you can't interact with it in any way; it's just like a background element.
User Avatar
3 years ago
Auto-translated
Place any static object. Go to Shared, click New. Enter a name (for example, act_trupik). Click OK. Repeat the steps with the model and animset
And you won't have to ruin the posters smile
3 years ago
Auto-translated
Well, that's exactly what I was doing; I was copying the poster and then modifying the copy, essentially creating a new one. But here's another problem that arose, and it's unclear why. I created a folder in AdvMapStaticShared, and inside it, I created a copy of the poster. I added a dead creature to the map and did this with several different dead creatures, saved, and exited. Today, I open the editor and realize that it doesn't recognize the new folder, along with everything inside it. It only shows the shared dead creature if you click on it, but there's only the object for that one, and not for the others. I don't understand what the problem is at all. If I unzip the map, all the objects are there.
Attachments 2
2 files attached • Total size: 78.5 KB
User Avatar
3 years ago
Auto-translated
The visibility of objects in the file tree is controlled by index.bin. When working with a map, the main index.bin does not change; instead, a small copy (a few KB) is created, which is reset and recreated after each map opening. The solution is to work with elements using an extended editor and with the map closed, storing all changes in a pak file, so that everything will be visible on the map.

Statistics

Welcome our newest member: recijeb