Spell Help: Shooter-esque bullet spray damage

MintJulep

New Member
Reaction score
4
Basically, I wanted to create a spell that would:

1. Shoot out orbs/bullets in all directions
2. Instead of AOE damage, whenever an enemy unit touches a bullet, the bullet would explode and deal damage.

In essence, the spell would be very similiar to a top-down shooter, where bosses fire bullets everywhere and you have to maneuver around them:

-> http://www.youtube.com/watch?v=RZ8nkezy_rw

I think I can roughly replicate the visuals, or #1 (basically, just make a few dozen units shaped like orbs, and move them around). However, doing #2 on the list seems really difficult. I don't want to just give the units immolation, I'd like it so that whenever one of the bullet units is in range of an enemy unit, the bullet would explode and deal damage just like in a shooter.

Ideally, I'm hoping there's some ability I don't know about that'll make #2 really easy (like "explosion", I'm not really sure how that works). Of course we can write a trigger that just makes a gazillion locations per second centered on the unit, as well as a second trigger checking every .02 seconds in each location for enemies, but I'm guessing that would make the spell unbearably laggy. Or would it?...
 

PureOwnage

Minecraft Server OP, Inactive.
Reaction score
72
1) Dummy Unit with a bullet model.
2) If a unit comes into 300 range of unit, then kill unit. Unit is equal to bullet dummy.
Deal damage in a X AOE
 

MintJulep

New Member
Reaction score
4
But an event like, "A unit comes within range of (unit)" only exists for preset units. Units created by spells can't be premade, and you can't make any events like, "A unit comes within range of (unit of unit type)" unfortunately.
 

Ghostwind

o________o
Reaction score
172
Well if the unit is created in your spell you can reference to it with

1: variable (array)
2: last created unit (if no waits are involved)
 

MintJulep

New Member
Reaction score
4
Okay, here's a possibility then:

Trigger 1
For each integer A from 1 to 20
- Create bullet
- Set (last created unit) as Bullet[A]
- Add event to (Trigger 2), A unit comes within 100 of Bullet[A]


Trigger 2
- Deal X damage to (triggering unit)


That does 3/4 things that we wanted. But how do we write the action that kills the bullet[A]?
Trigger 2 can't detect which event triggered it! And no, different types of bullets will be overlapping each other frequently so killing the one that's closest to the triggering unit might end up with some errors.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top