Unit comes within X range of unit create new unit...

Husky

Local Lurker
Reaction score
119
PLEASE READ POST 7 BEFORE READING THIS.

Hi, Okay this is what I want to happen:
NOTE: This is like sheep tag.
When a unit comes within X range of unit that unit dies and another one is created in his spot except that the one created in his spot is a different model.
Simplified:
When the tagger comes very close to the Hider (people that run away) the Hider becomes the tagger.

This is what I got but it doesn't seem to work:

Events
Unit - A unit comes within 200.00 (I change this) of Hider 0002 <gen>

Conditions
(Unit-type of (Triggering unit)) Equal to Hider

Actions
Unit - Create 1 Tagger for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Game - Display to (All players) the text: ((Name of (Triggering player)) + Is it, watch out!)

Well I thought that would work but it doesn't unfortunatly.
Any ideas on whats wrong?
-Husky

EDIT: Hmm I may have a solution, i'll post back soon...
 
:D The Condition Should be equal to the tagger not the hidder i think anyway i hope i can help u :(
 
Hey,
Yeah that did work but not without problems as you'll see in few seconds:
*Okay, the tagger walks close to hider and the hider dies :D.
*Problem: When the hider dies multiple taggers are created beside just the one that just killed the hider.

I've got no idea why this happens but if you have any ideas on how to prevent this that would be great.
-Husky

EDIT:
Well I did notice this:
husky_003 said:
Actions
Unit - Create 1 Tagger for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
Game - Display to (All players) the text: ((Name of (Triggering player)) + Is it, watch out!)

But it still says "1" not "3", hmm, I'll play around a bit and see if anything works.
 
Hm...

So, a unit comes "close enough",
you create a new unit right there,
and, well..., there's one more unit now that is "close enough"...

Also, in the trigger you posted, I don't see the part that kills any unit.

Maybe you repost your current best version?
 
Sorry I removed the "Event" and "Condition" parts but this is my current version and it works nearly perfectly:

Player gets tagged
Events
Unit - A unit comes within 100.00 of Hider 0002 <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Tagger
Actions
Unit - Kill Hider 0002 <gen>
Unit - Kill Tagger 0000 <gen>
Unit - Create 1 Tagger for (Owner of (Triggering unit)) at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Hider for (Owner of (Triggering unit)) at (Random point in (Playable map area)) facing Default building facing degrees
Game - Display to (All players) the text: ((Name of (Triggering player)) + Is it, watch out!)

Problem is when the unit dies he's actually set to a hero so in the top right for each time you die heaps oh "hero icons" pop up.
Other Problem: Is listed in one of my other threads is the "spawning in random spot of playable map area"

Hope that helped to clarify some stuff up,
-Husky
 
THIS POST IS TO CLARIFY WHAT I WANT TO HAPPEN, PLEASE READ THIS BEFORE ANY OTHER POSTS.

Sorry for the long post, but please bear with me.
Hmm, i'm having a lot of problems with this.
I'm making a kind of sheep tag map. So the when the "tagger" gets really close to the "hider" (people that run away) the hider becomes the tagger.
I've got this:

Tagged
Events
Unit - A unit comes within 175.00 of Hider 0002 <gen>

Conditions
(Unit-type of (Triggering unit)) Equal to Tagger

Actions
Unit - Kill Hider 0002 <gen>
Unit - Kill Tagger 0000 <gen>
Wait 2.00 seconds
Unit - Remove Hider 0002 <gen> from the game
Unit - Remove Tagger 0000 <gen> from the game
Unit - Create 1 Tagger for (Owner of (Triggering unit)) at (Random point in spawn 1 <gen>) facing Default building facing degrees
Game - Display to (All players) the text: ((Name of (Triggering player)) + Is it, watch out!)

Okay so that... works, I guess. But the problem is it will only work when "Tagger 0000" goes within range of "Hider 0002".
But since this is played with up to 12 players I need it so that any "Tagger" can tag any "Hider". Anyway the only way I could think of doing that is in Conditions: Triggering Unit, (one Triggering Unit for the Hider and another for the Tagger) but I think you can only have one of those per trigger or they will clash.
I thought I could get around this by making two seperate triggers but that didn't work. I think you do have to do two seperate ones, but I think I was just doing it wrong.
NOTE: I understand if you didn't understand much of that.

Any ideas, or could someone please post up some code.
Thanks,
-Husky
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    Luckily I live in an age with electricity so it's way fucking faster, but when I was just a boy trying to find my place I had some hardcore chefs that made use do things like that by hand. It is WAY easier to get right by hand because you control it and can feel it, but it takes soooooo much longer. And on the scale a modern kitchen requires... I serve 400-500 guests on average per day right now, if I had 100 then we could do things way better
  • Varine Varine:
    But we can't do that. In the winter yeah, but I HAVE to get people through here right now so I can afford the staff that we CAN do that. We have about 100 days of summer, and if that summer doesn't make us what it will, then I can't operate the other most of the year with my staff. The owner is talking about closing two days a week to cut down on labor, I told him he should cut down on vacations and it did not go great. I do think I won though, I have to keep my fucking core staff and they have to be gainfully employed
  • Varine Varine:
    Sure some of them might take a second job, but I can't just cut my entire staff to unlivable hours, nor can I can cut them off all winter if I want them to come back.
  • Varine Varine:
    And also, there is no fucking way I'm pulling these hours come september. I only do this right now because I have to, the second I don't have to be the one doing it I won't be
  • Varine Varine:
    I have a 5 person core staff in the kitchen, not including me or Chef Ben
  • Varine Varine:
    Though two of those people are likely not making it this year. One of them has been replaced, the other I am kind of trying to. He's being a giant bitch, today I had to get onto him because in the three hours before I left he had taken like thirty minutes for cigarette breaks
  • Varine Varine:
    And he was also complaining to me the other day that he was out of weed so couldn't smoke any before work that day, and was confused about why I was annoyed he was telling me, his boss, that he is smoking weed everyday before work.
    +1
  • Varine Varine:
    Like yeah I can tell. I don't need to fucking know.
  • Varine Varine:
    So now he's getting scrutinized and will not be top of the list. I know I don't have the smartest people but I do expect them to have some common fucking sense
  • Varine Varine:
    I did do a rare thing for me and hire a girl last month without warning. Everyone was made at me because I started her at like 21, but she worked with me before and I was like don't care. She made 19 at her old job and I wanted her to come work with me, she is the best
    +1
  • Varine Varine:
    I'm going to get her a raise at the end of the summer. She wants to go to school again, but I want her to still work with me so.... she kind of can just tell me what the price is. I can go to 25 if she keeps up. I need to get her onto line more, that's what she wants, but I need her where she is and it's not fair that she doesn't get the little bit of raise that comes with it. She can do it no problem, I've worked with her there.
  • Varine Varine:
    It's just hard to move and train people unnecessarily right now. And also the line fucking sucks, it's not any more fun. This is turn and burn so I have the bankroll, and everyone suffers for it
  • Varine Varine:
    Eventually we'll get it balanced, we'
  • Varine Varine:
    we're starting online orders and stuff, but I also turn that off all the time because I barely keep up trying to be the best at Sysco shit
  • Varine Varine:
    I think it's gonna be a good fall and winter though. We're going to have a good staff, they will get along, they will be able to manage the workload and the complications, they know how to really cook this year, like every person on line knows their steak temps. Some of them use thermometers a lot and they don't always use them right, but they do know how to do it. Failure, especially in this field, is the only way to get better. They'll get it
  • Varine Varine:
    They won't get feel down while they do the thermometer, but we didn't have an instant read probe when I was learning. Like they did but god knows how off it is, you HAD to do it by feel. Even if the chef was fine with me bringing my own, it takes too long. Poke and know
  • The Helper The Helper:
    420 threads in the Artificial Intelligence forum :)
  • The Helper The Helper:
    Happy Monday!
    +1
  • The Helper The Helper:
    and then it was Tuesday!
    +1
  • The Helper The Helper:
    fyi I am going out of town to lake somewhere in bfe texas for the weekend will be gone Friday morning to sunday afternoon for a paranormal thing and some rest peace
  • jonas jonas:
    cool take it easy
  • jonas jonas:
    I recently had an experience with a waiter that really brought down @Varine's point about them being in sales. The first waiter just asked "anything else? deserts?" and when the table shook their head said "ok" and left. Then the other waiter came in and started going off describing the deserts and you could see the heads turning, and they finally got a bunch of deserts
  • jonas jonas:
    makes sense if you consider that the tip is basically a commission on sales

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top