create an prison...

Status
Not open for further replies.
Level 3
Joined
Sep 29, 2011
Messages
20
i think that the way to do that is putting units in the borders with some high collision size but i went to know how to put some lighting effects in the barrier since putting a trigger with expiration timer would only remove ONE unit from the barrier and that destroy last created lighting effect also destroy only ONE lighting effect.that is the great problem. i want a trigger fix do someone knows how to do that?
 
Last edited:
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Set IB_ang_add = 36
  • Set tmppoint = (Position of (Target unit of ability being cast))
  • Set ang = -30.00
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • Set tmppoint2 = (tmppoint offset by 100.00 towards (ang + (360.00 / ang_add)) degrees)
      • Unit - Create 1 DUMMYUNIT for (Owner of (Triggering unit)) at tmppoint2 facing tmppoint
      • Set IB_ang = (IB_ang + (360.00 / IB_ang_add))
      • Unit - Add a 5.00 second Standard expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_tmppoint2)
  • Set IB_ang = 0.00
    • Unit - Create 1 DUMMYUNIT2 for (Owner of (Triggering unit)) at tmppoint facing tmppoint
  • Unit - Add a 5.00 second Standard expiration timer to (Last created unit)
  • Custom script: call RemoveLocation(udg_tmppoint)
What it does is create 10 dummyunits each apart by 36° and a dummy unit in the middle.
If you add a certain aura effect to it (I can't remember the name) it'll take away the set hitpoints from every enemy unit inside the AoE.
Make sure your first dummy has collision and the second doesnt.
Using a secondardy, periodic trigger, you can spawn random effects while the dummy is alive, like

Every 1s of the game time,
Set tmpgrp = Every unit of type DUMMYUNIT2
--If number of units in tmpgrp > 0 do:
----Set temppoint = Pos. of picked unit
----Set temppoint2 = temppoint1 offset by (Random number between 0 and 500) towards (Random number between 0 and 360) degrees
----Create sfx on temppoint2
----Destroy (last created sfx)
--Else
----Turn off (This trigger)
Custom script: call DestroyGroup(udg_tmpgrp)
If doing so, make sure you Turn on the second trigger while triggering the first

Both may vary since they're typed by hand and I haven't opened WE in like a year
 
Level 3
Joined
Sep 29, 2011
Messages
20
  • Set tmppoint2 = (tmppoint offset by 100.00 towards (ang + (360.00 / ang_add)) degrees)
what does ang_add means?

EDIT:
heres my trigger based on what you said:

  • thunderbarrier
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to thunderbarrier
    • Actions
      • Set IB_ang_add = 36
      • Set tmppoint = (Target point of ability being cast)
      • Set ang = -30.00
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set tmppoint2 = (tmppoint offset by 100.00 towards (ang + (360.00 / ang_add)) degrees)
          • Unit - Create 1 DUMMY1 for (Owner of (Triggering unit)) at tmppoint2 facing Default building facing degrees
          • Set IB_ang = (360.00 / (Real(IB_ang_add)))
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_tmppoint2)
      • Set IB_ang = 0.00
      • Unit - Create 1 DUMMY2 for (Owner of (Triggering unit)) at tmppoint facing tmppoint
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_tmppoint)
it doesn't works. the units just don't spawn.
 
Last edited:
Level 8
Joined
Dec 9, 2009
Messages
397
Model size won't change collision size.

Trigger looks like it should work imo, I don't see anything wrong. Something should show, try adding some special effects and see if they show.
 
Status
Not open for further replies.
Top