Author Topic: Choose a spawn object location  (Read 6541 times)

Epictus

  • Posts: 12
  • Maggot Crusher.
    • View Profile
Choose a spawn object location
« 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

Flemse

  • Posts: 67
  • Maggot Crusher.
    • View Profile
Re: Choose a spawn object location
« Reply #1 on: October 23, 2015, 03:35:35 AM »
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.
« Last Edit: October 23, 2015, 03:37:10 AM by Flemse »

Epictus

  • Posts: 12
  • Maggot Crusher.
    • View Profile
Re: Choose a spawn object location
« Reply #2 on: October 23, 2015, 03:58:07 AM »
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.
« Last Edit: October 23, 2015, 04:00:46 AM by Epictus »

Flemse

  • Posts: 67
  • Maggot Crusher.
    • View Profile
Re: Choose a spawn object location
« Reply #3 on: October 23, 2015, 12:41:28 PM »
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.

Epictus

  • Posts: 12
  • Maggot Crusher.
    • View Profile
Re: Choose a spawn object location
« Reply #4 on: October 23, 2015, 03:09:21 PM »
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 :)

Flemse

  • Posts: 67
  • Maggot Crusher.
    • View Profile
Re: Choose a spawn object location
« Reply #5 on: October 23, 2015, 08:42:00 PM »
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.

Epictus

  • Posts: 12
  • Maggot Crusher.
    • View Profile
Re: Choose a spawn object location
« Reply #6 on: October 25, 2015, 08:58:50 PM »
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>
« Last Edit: October 25, 2015, 09:00:33 PM by Epictus »

Flemse

  • Posts: 67
  • Maggot Crusher.
    • View Profile
Re: Choose a spawn object location
« Reply #7 on: October 26, 2015, 07:03:55 PM »
Ah, of course, like the golden ticks. Very nice.