Author Topic: Trap effects  (Read 8732 times)

Ranyo7

  • Posts: 2
    • View Profile
Trap effects
« on: December 03, 2013, 05:09:05 AM »
I'm making a kind of tower defense map and I was wondering if a trap could have player effects added to it, such as...
mage ice nova slow
mage combustion
warlock 'chain' lightning
warlock poison
adding a warrior's stun attack and percentage to hit

I don't care if they don't affect the player, but i am concerned with if they hit and affect enemies.
Is it possible? How?
Also, a quick question; Is it possible to create Npcs that can walk around and aren't just objects like the vendors?

Myran

  • Developer
  • Posts: 183
    • View Profile
Re: Trap effects
« Reply #1 on: December 03, 2013, 04:35:52 PM »
In the next patch we have added a system to make your own "buffs" like the wizards combustion and his frost, these can be applied on both enemies and players and can be put on damage areas, projectiles, melee attacks. So a lot of what you want will be possible, although not the warlocks chain lightning.

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: Trap effects
« Reply #2 on: December 03, 2013, 05:08:09 PM »
Also, yes you can have NPCs that walk around and even talk and such, using the waypoint/move object scripts. This was done in one of the custom campaigns - Requiem for Hammerwatch I believe.

Ranyo7

  • Posts: 2
    • View Profile
Re: Trap effects
« Reply #3 on: December 03, 2013, 10:26:03 PM »
I don't see either the "Move object" or "waypoint" scripts you're talking about in the scripting tab of the editor. Are they perhaps files and not editor script objects? Or are you talking about MoveAI and path nodes?

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: Trap effects
« Reply #4 on: December 04, 2013, 01:54:46 AM »
Sorry, you're right. I get my editors mixed up sometimes! You're looking for PathNode and MoveAI

Flopjack

  • Posts: 19
  • Maggot Crusher.
    • View Profile
Re: Trap effects
« Reply #5 on: December 15, 2013, 08:32:22 PM »
Is there an "attackMoveAI"? I'd love to be able to make a patrol of enemies, but then they engage players when they notice the players.

MrCuddles

  • Posts: 14
  • Maggot Crusher.
    • View Profile
Re: Trap effects
« Reply #6 on: January 10, 2014, 11:09:46 AM »
In the next patch we have added a system to make your own "buffs" like the wizards combustion and his frost, these can be applied on both enemies and players and can be put on damage areas, projectiles, melee attacks. So a lot of what you want will be possible, although not the warlocks chain lightning.

Any update on this?

Heretic

  • Moderator
  • Posts: 305
  • Castle Runner
    • View Profile
Re: Trap effects
« Reply #7 on: January 10, 2014, 04:11:23 PM »
Any update on this?

Yes! 1.2 is out! There are custom buffs to be used now, I use several already such as:

When zombie spikes get you - you slow down (waaay down)
Spiders shoot you with web, and webbing gums up your feet and slows you down.

The buffs allow you to do the following:

Upon receiving damage -
Change damage multiplier (usually to lessen it, multiply by 0.7, etc)
Change movement multiplier (same, like multiply by 0.5)
Create a light effect around the player
Display a 'buff' on the player (like my webs)
Set a time limit on the buff.


You can view these effects merely by playing the HW campaign - as all older mobs have been redone to include things such as burning, poison, cold/slow, etc!

Here is the default one for maggot poison:

Code: [Select]
<buff>
<behavior>
<dictionary>
<string name="color">135 255 165</string>

<int name="duration">4500</int>
<float name="speed-mul">0.66</float>
<float name="dmg-mul">0.75</float>

<dictionary name="damage">
<int name="freq">1500</int>
<int name="dmg">2</int>
<bool name="can-kill">false</bool>
</dictionary>

<array name="effects">
<dictionary>
<string name="type">particles</string>

<string name="sprite">effects/particles.xml:poison-particle</string>

<int name="freq">75</int>
<int name="rate">50</int>

<vec2 name="dir">0 1</vec2>
<float name="dir-spread">0</float>

<float name="speed">0.25</float>
</dictionary>
</array>
</dictionary>
</behavior>
</buff>

And to call the buff in an actor's attack, its actually in the Projectile.xml that the actor uses:

Code: [Select]
<projectile directions="8" collision="0.75" damage="5" speed="0.75" behavior="neutral">
<behavior>
<dictionary>
<string name="buff">buffs/maggot_poison.xml</string>
</dictionary>
</behavior>

...ETC

Was that helpful?

MrCuddles

  • Posts: 14
  • Maggot Crusher.
    • View Profile
Re: Trap effects
« Reply #8 on: January 10, 2014, 11:02:48 PM »
I don't see all these xml files in my editor folder. Do I need to unpack something first maybe?

Hipshot

  • Developer
  • Posts: 455
  • Level Designer
    • View Profile
Re: Trap effects
« Reply #9 on: January 12, 2014, 04:00:15 PM »
You need to use the unpacker, that is located in your game directory.

MrCuddles

  • Posts: 14
  • Maggot Crusher.
    • View Profile
Re: Trap effects
« Reply #10 on: January 12, 2014, 10:18:06 PM »
got it thanks.