Region (help)

MissKerrigan

Active Member
Reaction score
23
Hello,

Which trigger do I need if I want a region to follow a units constantly?

MissKerrigan
 

X-maul

AKA: Demtrod
Reaction score
201
I do not have the editor at me at the moment, but I'm pretty sure that there's a trigger action that moves a region.
You will have to periodically (like every 0.1 sec) move the region to the location of your unit.
 

MissKerrigan

Active Member
Reaction score
23
yes but there are 4 players, and every player controls about of 6-8 units in game, so isn't this a bit hard for the computer to do all this?

MissKerrigan
 

MissKerrigan

Active Member
Reaction score
23
ok I explain my situation:

I created the next trigger actions:

-repeat actions forever:
+
- create 1 baneling at 'banelings 1' for player 'computer' facing no angels
- wait '1' game seconds

The banelings moving to a location when they appears in the region


Now if you are familiar with the editor, you know about the distance the banelings have
Your goal is to pass the banelings by walking between them WITHOUT touching them

Is there any trigger which activates if 1 of the banelings touches your unit?
Because for some reason this is a little bit wrong when using regions for this
Sometimes when I pass the banelings correct, my unit still dies so I prefer to not using regions

Does anyone has a clue how I can make this?

(your unit only must be dead if the banelings TOUCHES your unit)
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
I would do it in the data editor. It should be pretty easy. Make a new behavior with a periodic search effect. Make the search start a damage effect on the caster with "fatal" checked.

You could apply some good unit filter on the search, but if you have other zerg units, it might conflict. Best way would be to add a validator that checks the target's unit type and compares it to baneling.

Give this behavior to a unit and it should die if it comes close to banelings. You can then use a trigger like this if you want to do something more:

Events:
Any Unit Dies
Conditions:
(Unit type of (Triggering Unit)) == Your Unit
Local Variables:
Actions:
*Do stuff*

If you want your unit to be able to die for other reasons, you should skip the damage(set damage to 0 and uncheck "fatal") and just have the trigger run when the effect is ran.
 

MissKerrigan

Active Member
Reaction score
23
the only things I wanna make is giving the player a ghost which must run through a lot 'lines' of banelings

problem 1: if I give the banelings the 'attack' order, they will move to your ghost
problem 2: if I give the banelings the 'move' order, they will not explode if your unit touches them

the only simple thing I wanna make is that the baneling explodes when your ghost touch a baneling, this can't be so hard right?
 

MissKerrigan

Active Member
Reaction score
23
yes the banelings are moving from the top to bottom of the small field of 16x16

so your ghost must pass a few lines of banelings without touching them

if your ghost touches a baneling, THIS baneling must explode and you ghost must die
 

MissKerrigan

Active Member
Reaction score
23
omg the baneling must move, but just from the top to the bottom, and not in your direction to attack you
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i think the answer here will be to "recreate" the baneling ability

  1. Create a new behavior... call it Baneling Explosion, it should be the "buff" type
  2. set it's period duration to 0.2 seconds or something close to that and its period count to -1
  3. create a new effect called Baneling Explosion Radius of type "search" and set the Baneling Explosion behavior's periodic effect to this
  4. add to the areas+ field an area with the range you want the baneling to explode at
  5. set the maximum count on this area to 1 (1 explosion max, otherwise if 2 units are in range they both take double damage)
  6. Create a new effect called Baneling Explosion Set of type "set" and set the Baneling Explosion Radius area effect to this
  7. Create a new effect called Baneling Explosion Damage Radius of type "search" and add this to the Baneling Explosion Set effect list
  8. add to the areas+ field an area with the max range you want units to be damaged at
  9. Create a new effect called Baneling Explosion Damage of type "damage" and set the Baneling Explosion Damage Radius area effect to this
  10. Set the stats on the damage, and make sure to set the allowed targets
  11. Create a new effect called Baneling Explosion Suicide of type "damage" and add this to the set
  12. Set the flag fatal to true
  13. Link all the actors for the baneling explosion ability to this behavior correctly and walah, you have a baneling explosion that happens when anything gets near it, but has no actual action, allowing it to be case without the baneling chasing it
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
That's basically what I said, but your reply is more thorough :) Although I suggested to give a behavior to the player's unit. Giving it to the banelings is more work for the game(Since there are probably more banelings than ghosts) , but better in the long run if you want to have more units to avoid). Some things to note however:

* You don't need a separate search effect for the AoE damage. The damage effect can handle AoE damage itself.

* You will have to set the first search area's target filters so it doesn't target other banelings or itself or something else weird. You could also do this with a validator.

* You'll probably have to set the impact location of the second search area effect(or the damage effect, if you skip the second search) to caster. I think it defaults to the position of the target, which would make the explosion's center be at the player's unit instead of at the baneling. I might be wrong, however.

Since we're talking about Banelings, I think a better solution would be a mix. A behavior with a periodic search with a max count of 1. The effect it runs is an issue order on the caster which tells it to explode. Modify the explosion damage by checking "fatal". This way, all the actors still work, and you don't have to mess with them.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
@GFreak: Why the set? If I read it correctly, you only add one effect to it anyway.

Gfreak's explanation doesn't contain 6 effects, and I think you could do it with 2.
 

MissKerrigan

Active Member
Reaction score
23
OMG X-MAUL

I found out a trigger action which attaches a region to a unit

now please look at your first reply... (very funny)
Looks like I caught ya on a work-arround how siretu likes to call these
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
@siretu

it uses 2 effect, aoe, and dmg self, i dont want it to rely on the same effect for both because you cant set the first to instakill
 

MissKerrigan

Active Member
Reaction score
23
I do not have the editor at me at the moment, but I'm pretty sure that there's a trigger action that moves a region.
You will have to periodically (like every 0.1 sec) move the region to the location of your unit.

An easier way is to attach a region on a unit so you don't need a trigger-action to move a region to unit + wait 0.1 seconds and repeat
 

X-maul

AKA: Demtrod
Reaction score
201
OMG X-MAUL

I found out a trigger action which attaches a region to a unit

now please look at your first reply... (very funny)
Looks like I caught ya on a work-arround how siretu likes to call these
Well, I did say that I did not have the editor at me, so I could not look though the actions available ;)
Good that you figured it out yourself.
 

MissKerrigan

Active Member
Reaction score
23
yes I figured out, but what if the unit dies? does the region stays at the place where the unit dies?
 
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