How can i kill units that get close to unit type... like immolation skill in warcraft

Shlomi1515

New Member
Reaction score
2
im wanna make a snake game in sc2 and right now i have tired so many triggers to make the snake die when he get stuck in his tail or others... but i cant get any trigger to work 100%....

how can i do it? plz help me guys...

btw in warcraft 3 editor it was very faking easy :) i just added the Immolation skill...
 

Monsterous

In the Shadows, Lurking.
Reaction score
99
I can see two ways on how to do this.

Way One - Data Editor
You would most likely get an area of effect spell that is constantly on around the user, such as Invisibility Field or Detection, and have the target be enemy units, and have the effect be damage instead of say invis or detection.

Way Two - Trigger Editor
You could just check whenever a unit gets into X range of other unit in events, and have damage occur or whatever you want it to do in actions.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Data editor:

1. behavior (type: buff) "snake buff" add to your snake units. set stats - period to whatever you would like. (I would suggest maybe .01)
2. effect: (type: create persistent) "snake find" add to the periodic value of "snake buff"
3. effect: (type: search area) "snake searchkill" go to search - areas and add a new search. effect will be kill and you can edit your radius.

easy as pie.
 

ZeroPoints

New Member
Reaction score
8
Dan the create persistant isnt needed i dont think. you can have the buff have a period thingy on it
 

Shlomi1515

New Member
Reaction score
2
I can see two ways on how to do this.

Way One - Data Editor
You would most likely get an area of effect spell that is constantly on around the user, such as Invisibility Field or Detection, and have the target be enemy units, and have the effect be damage instead of say invis or detection.

Way Two - Trigger Editor
You could just check whenever a unit gets into X range of other unit in events, and have damage occur or whatever you want it to do in actions.

can u make the trigger and paste it as text?
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Dan the create persistant isnt needed i dont think. you can have the buff have a period thingy on it

This is very true.

1. behavior (type: buff) "snake buff" add to your snake units. set stats - period to whatever you would like. (I would suggest maybe .01)
2. effect: (type: search area) "snake searchkill" go to search - areas and add a new search. effect will be kill and you can edit your radius.

add the effect to the periodic value on your behavior. give your unit the behavior. viola!
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
can u make the trigger and paste it as text?
A trigger would be silly to use.

+ open the data editor. (can't find it? press A)
+ go to the data type list in the upper left corner. (can't find it? press B)
+ choose "behaviors" and right click in the list and create a new one. (for help, press C)
+ the type of behavior you are making is of type buff, as stated above. once you make the behavior, give it to your unit. (for help, press D)
+ once your unit has the behavior, you need to make the behavior have an effect that will make your unit deadly. You will now want to make a new data type of type effect. this effect will be of type search area. (for help, press E)
+ edit the search - areas portion of the effect so that you have a new search that finds a unit and kills it with the kill effect. (for help, press F)
+ finally, link your custom effect to your custom behavior. You do this by putting the effect in the persistent part of the behavior. (for help, press G)

post the letter of where you get stuck so that I may further help you. :)
 

ZeroPoints

New Member
Reaction score
8
if it was to be trigger it would be something like
event: every 1 sec of game time
but this is bad practice making a trigger that fires every 1 second via triggers
 

Shlomi1515

New Member
Reaction score
2
i did

Events
Timer - Every 0.1 seconds of Game Time
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(NewHero[1] is Cloaked) == true
Then
Unit - Kill NewHero[1]
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(NewHero[2] is Cloaked) == true
Then
Unit - Kill NewHero[2]
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(NewHero[3] is Cloaked) == true
Then
Unit - Kill NewHero[3]
Else
General - If (Conditions) then do (Actions) else do (Actions)
If
(NewHero[4] is Cloaked) == true
Then
Unit - Kill NewHero[4]
Else

i used mothership field cloak and the radius is 0.001 which is work great

it's only game for 4 so i think it's fine? or it's very bad what do you think guys?
 

SerraAvenger

Cuz I can
Reaction score
234
Original snake: Create an abstraction of your playing board, similar to a board of chess, and remember for every field which snake is currently on it.

EDIT: Whenever a snake moves, first check if the new field is "empty", if it is move the the snake, if there is food on it move it and add a new dot, if there's another snake/itself apply all your kill/death counting and whatnot. Apart from death, which is in O(length), all of these operations are in O(1)
 

ZeroPoints

New Member
Reaction score
8
well aslong as it works for what you need atm its fine. but later try refine it or review it again if you run into laggy gameplay
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Original snake: Create an abstraction of your playing board, similar to a board of chess, and remember for every field which snake is currently on it.

EDIT: Whenever a snake moves, first check if the new field is "empty", if it is move the the snake, if there is food on it move it and add a new dot, if there's another snake/itself apply all your kill/death counting and whatnot. Apart from death, which is in O(length), all of these operations are in O(1)

You're so smart it hurts my brain. :)
 
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