A forcefield trap!

Jokker

Member
Reaction score
16
Hello everyone!

I saw a video of Siretus project "Banelings". This one to be exact.

In the video there is a baneling that on impact forms a forcefield circle. I have been planning on implementing this to a spider mine for a long time. So I turned to Siretu for help and guidance. He replied gladly that I should make a forum topic so everyone could benefit from the tutorial.

So here we are. And many thanks to Siretu in advance!

All the best,
Jokker
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
First of all, I made the forcefield trap with triggers. Mostly because I'm lazy. It's possible to do with the data editor as well.

Here's what my trigger looks like:
Trigger:
  • Force Field
    • Events
      • Unit - Any Unit dies
    • Local Variables
    • Conditions
      • (Unit type of (Triggering unit)) == Force Baneling
    • Actions
      • General - Pick each integer from 1 to 14, and do (Actions)
        • Actions
          • Unit - Create 1 Force Field for player (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by 2.2 towards (25.7 * (Real((Picked integer)))) degrees) using default facing (Ignore Placement)
          • Unit - Add 1 Sentry - ForceField Fate to (Last created unit) from (Triggering unit)


It's pretty simple. When a force baneling dies, create 14 force fields around the dying unit and add the ForceField Fate behavior which makes the force field die after 15 second.

Now, I'm assuming you want the spider mine to move like normal and unburrow when an enemy unit comes close. Basically, the spider mine has a weapon that deals damage and kills the spider mine. We want to modify this so it creates a force field wall and kills the spider mine.

I've decided to show how to do this in the data editor. If you want a simple trigger solution, just take the trigger above and change the condition to the "Vulture - Spider Mine". You might also want to remove "Vulture - Spider Mines (Damage)" from the Effect: Effects + field of "Vulture - Spider Mines (Set)"

First, we need a "Create Persistent" effect to create all the force fields. Create a new "Create Persistent" effect called "Force Field Trap (Persistent)".

I decided that I want 12 force fields this time around. This means I'll have periodic offsets with the angle 0,30,60,90,120,150,180,210,240,270,300 and 330. With some basic trigonometry you can get the correct offsets you need. Here's what the offsets I got, open up the "Effect: Periodic Offsets + and add the following offsets:

(2,0,0)
(1.732,1,0)
(1,1.732,0)
(0,2,0)
(-1,1.732,0)
(-1.732,1,0)
(-2,0,0)
(-1.732,-1,0)
(-1,-1.732,0)
(0,-2,0)
(1,-1.732,0)
(1.732,-1.732,0)

Set the "Effect: Period Effects +" to "Sentry - Force Field" and "Effect: Period Count to 12.

Next, go into the unit tab and modify the Force Field Unit. Set the radius to 0.5 and the the force field's actor scale to (0.33,0.33,0.33).

The last step is to apply it to the spider mine. Go to the effect tab and find "Vulture - Spider Mines (Set)". Open the Effect: Effects + field and replace "Vulture - Spider Mines (Damage)" with Force Field Trap (Persistent)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top