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...
 
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.
 
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.
 
Dan the create persistant isnt needed i dont think. you can have the buff have a period thingy on it
 
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 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!
 
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. :)
 
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
 
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?
 
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)
 
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
 
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.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/
  • The Helper The Helper:
    Happy Thursday!
  • Ghan Ghan:
    I'm not so sure, there's still a lot of Thursday left for it to become unhappy.
    +3
  • The Helper The Helper:
    still a few hours
  • The Helper The Helper:
    Its Friday!!!!
    +1
  • Ghan Ghan:
    Thursday 7/10 would Thursday again
    +3
  • The Helper The Helper:
    New forum coming soon going to be for my friend Saylor who is blind and he is doing motivational speaking and has an internet radio show and podcast. I am going to put a forum to promote him and other inspirational speaker stuff going to have some good stuff in it.
  • The Helper The Helper:
    his audio only music mix
  • The Helper The Helper:
    it just makes sense right?

      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