Author Topic: Help with custom projectile  (Read 6690 times)

mango123

  • Posts: 7
  • Maggot Crusher.
    • View Profile
Help with custom projectile
« on: August 25, 2013, 11:46:51 PM »
So I created a custom projectile and I want it not to hurt players but i cant seem to get that part to work. If anybody can help then thanks :D

Xeronkar

  • Posts: 102
  • Boss scripter
    • View Profile
Re: Help with custom projectile
« Reply #1 on: August 26, 2013, 01:06:01 AM »
I just can advice you with copying an existing .xml projectile, and modify it for your own projectile

mango123

  • Posts: 7
  • Maggot Crusher.
    • View Profile
Re: Help with custom projectile
« Reply #2 on: August 26, 2013, 01:54:14 AM »
I tried that but it does damage to both me and monsters and i want it to only damage monsters just like in the defense map that comes with the game.

Xeronkar

  • Posts: 102
  • Boss scripter
    • View Profile
Re: Help with custom projectile
« Reply #3 on: August 26, 2013, 02:14:04 AM »
In that case, did you tried to edit the players .xml ?
With adding imunity to projectiles ? I've ever seen that on some bosses

mango123

  • Posts: 7
  • Maggot Crusher.
    • View Profile
Re: Help with custom projectile
« Reply #4 on: August 26, 2013, 03:21:38 AM »
sorry for the late reply but i have but im not entirely sure how to add that to players. I know how to do it for bosses but not players sry D:

Myran

  • Developer
  • Posts: 183
    • View Profile
Re: Help with custom projectile
« Reply #5 on: August 26, 2013, 02:57:06 PM »
Heres how it's done in the defense map:

Code: [Select]
<projectile directions="4" collision="0.85" damage="25" speed="1.1" hit-sound="sound/misc.xml:trap_fireball_hit" behavior="neutral">
<behavior>
<dictionary>
<entry name="range"><float>50</float></entry>
<entry name="category-override"><string>Player</string></entry>
</dictionary>
</behavior>

        .....
</projectile>

The "category-override" thing means the projectiles count as being owned by players no matter who shoots them.

Xeronkar

  • Posts: 102
  • Boss scripter
    • View Profile
Re: Help with custom projectile
« Reply #6 on: August 26, 2013, 03:31:53 PM »
Hum thanks a lot !!

mango123

  • Posts: 7
  • Maggot Crusher.
    • View Profile
Re: Help with custom projectile
« Reply #7 on: August 26, 2013, 04:59:43 PM »
Thanks myran this helps alot :D