Hammerwatch Forum
Custom mapping and Mods => Editor Discussion => Topic started by: Epictus on October 23, 2015, 01:55:13 AM
-
Hi, can anyone tell me how do you make a SpawnObject spawn at a certain location like under a boss after he dies with the ObjectEventTrigger
-
You can do that with a global event trigger set to trigger when the boss dies, but if you need to create a drop, I think you should add it to the bosses drop list in the xml with a 1000 setting, making it drop 100%. I might be able to explain it a little bit better if you need it.
On second thought, you can't do that with the global trigger. You should add the item to the drop list in the xml of the boss.
-
Yes sure, but the event i'm trying to create is more like dropping gold or stuff under him each time he gets hit, or spawning other monsters at his location. I will try the global event, thank you for your reply.
*edit*
The global event is for a boss right? I'm trying to make my event happen with anything I want, a monster, a box, a wall, etc...
Thanks.
-
Ok, if you need to make him do something when it is hit, you can use the objectevent trigger set to hit. If you need to do it when it reaches a certain amount of health instead, you can use globalevent trigger.
-
Yes I already am using the objectevent trigger set to hit, my question is, is there a way to make the object spawn at the location occupied by the monster hit while he moves and not the location where I put the spawnobject script.
Thank you :)
-
No, not to my knowledge.
"The global event is for a boss right?"
It's for global evets of all kinds. You can create your own flags for this as well, you don't have to use the standard events.
-
I finally found what I was looking for on an other topic, if anyone else wanna know. I just needed to add a passive skill for dropping gold, which could be for dropping anything really.
Just had to make sure the actor was set to behavior "composite", and add an active skill so the actor would not crash the game.
<array name="pskills">
<dictionary>
<string name="type">drop</string>
<string name="sound">sound/monsters.xml:death_tick_golden</string>
<int name="hp">10</int>
<dictionary name="loot">
<string name="origin">0 0</string>
<float name="spread">1.5</float>
<array name="loot">
<array>
<int>100</int><string>items/valuable_9.xml</string>
<int>200</int><string>items/valuable_8.xml</string>
<int>300</int><string>items/valuable_7.xml</string>
</array>
<array>
<int>200</int><string>items/valuable_4.xml</string>
<int>400</int><string>items/valuable_5.xml</string>
<int>300</int><string>items/valuable_6.xml</string>
<int>25</int><string>items/health_1.xml</string>
</array>
</array>
</dictionary>
</dictionary>
</array>
-
Ah, of course, like the golden ticks. Very nice.