if someone knows a trigger?

vexoh

Member
Reaction score
0
I need some triggers for a few things..

1. how do i make a unit be removed once he builds a certain building.. I tried to do this but when i click the building and am about to place it, the wisp is removed and also when i go into water or near a gold mine the wisp is removed.. :(

2.how can i set a trigger so that when a certain unit reaches certain ammount of HP he does an ability?

3. i set a trigger for 3 units to appear in my map when my building casts an ability but i dont want them to just appear, is their any way i can make them walk through a portal or atleast make it look like they where teleported their, And not just appeared

4. How can i ake a message appear where a unit enters specific area on my map and it says -Entering Murky swamp- and when they leave -Leaving Murky swamp- and i want the message to be sent to player entering not all the players ingame.

Any help will be awsome!!! Ty.
(4) is most important question ;P
 

jnZ

I
Reaction score
64
1:
not sure. is there a finished construction event? can't check right now since i don't have WE

2:
Code:
Event: Generic Unit Event - A Unit Takes Damage
Conditions: Integer Comparison - Unit - Life of Unit < 100
Actions: XXX

3:
Code:
Create Special Effect At Point
Create Unit At Point
Destroy Speciall Effect

4:
Code:
Event: A Unit Enters Region
Condition: Region Contains Unit: Swamp,Triggering Unit
Actions: Game - Text Message To All "Entering Swamp"
 

Xan_Kriegor

I can change this now in User CP.
Reaction score
12
(1) There should be an event for Unit - Finishes constructing a building. Try using that and see if it works.

(2) There are a few ways to do this, most of them somewhat complicated. The easiest one I can think of is simple, but also probably not what you want because it will spam the ability. What you would do is add any units you want to do this in a unit group, and then periodically do Pick all units in (group) If HP is less than *amount* then order picked unit to cast *ability* else do nothing. This will also only work if it's a targetless ability (such as Warstomp) unless you add in a way for it to target a nearby unit. The problem with this way is that it will spam the ability whenever the unit is low on health and the cooldown refreshes until it runs out of mana. Feel free to use this, but unless someone comes up with a better set-up this doesn't seem desirable.

(3) If you want to use a portal, I'd suggest making a dummy unit with the portal as its model, play the birth/death animation, and then spawn your units. Alternatively, if you want them to fade in, I'd put them in a unit group, set their transparency to 100%, and periodically set it lower (say every .05 seconds decrease transparency by 4%) would be my suggestion.

Hope this helps, and good luck with your map! EDIT: Curses, I knew I was going to get ninja'd.
 

jnZ

I
Reaction score
64
(2) There are a few ways to do this, most of them somewhat complicated. The easiest one I can think of is simple, but also probably not what you want because it will spam the ability. What you would do is add any units you want to do this in a unit group, and then periodically do Pick all units in (group) If HP is less than *amount* then order picked unit to cast *ability* else do nothing. This will also only work if it's a targetless ability (such as Warstomp) unless you add in a way for it to target a nearby unit. The problem with this way is that it will spam the ability whenever the unit is low on health and the cooldown refreshes until it runs out of mana. Feel free to use this, but unless someone comes up with a better set-up this doesn't seem desirable.

you could control that by the mana cost of the ability, ability cooldown or by setting the custom value of a unit who used an ability via this trigger to 0 and add a condition to the trigger to only run when custom value != 0
 

vexoh

Member
Reaction score
0
1:


4:
Code:
Event: A Unit Enters Region
Condition: Region Contains Unit: Swamp,Triggering Unit
Actions: Game - Text Message To All "Entering Swamp"
That wont work, because if i leave the swamp in the same direction it will say "entering swamp"
 

jnZ

I
Reaction score
64
thats just the simple version. something like that can be achieved by another region next to it and a simple variable.

but iam not up to date concerning the editor. there might even be an event like "unit leaves region"
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
1). Is your intended effect the same as when a wisp disappears after building an ancient? Or do you want the builder to disappear once the building starts construction?

2). If it's just one unit, there's the Unit - Life event that detects when a unit's life changes to above, below or equal to a certain value. If you have more than one units, create a dummy trigger with no events, then pick all your units and add their events to the dummy trigger with the Trigger - Add Event action.

4).
Trigger:
  • Entering Swamp
    • Events
      • Unit - A unit enters Swamp &lt;gen&gt;
    • Conditions
    • Actions
      • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Entering Swamp.

Trigger:
  • Leaving Swamp
    • Events
      • Unit - A unit leaves Swamp &lt;gen&gt;
    • Conditions
    • Actions
      • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Leaving Swamp.
 

vexoh

Member
Reaction score
0
1). Is your intended effect the same as when a wisp disappears after building an ancient? Or do you want the builder to disappear once the building starts construction?

2). If it's just one unit, there's the Unit - Life event that detects when a unit's life changes to above, below or equal to a certain value. If you have more than one units, create a dummy trigger with no events, then pick all your units and add their events to the dummy trigger with the Trigger - Add Event action.

4).
Trigger:
  • Entering Swamp
    • Events
      • Unit - A unit enters Swamp &lt;gen&gt;
    • Conditions
    • Actions
      • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Entering Swamp.

Trigger:
  • Leaving Swamp
    • Events
      • Unit - A unit leaves Swamp &lt;gen&gt;
    • Conditions
    • Actions
      • Game - Display to (Player group((Owner of (Triggering unit)))) the text: Leaving Swamp.

Ok i just want the wisp to dissapear during or after construction either are fine. And for (4) it wont work, Because say i have an area thats Shaped as a triangle which i have... I cant place just 1 Region because regions can only be shaped as a square I would need to place several regions and that wont work
 

jnZ

I
Reaction score
64
just do it the way i told you

for example

X 1 X
2 O X
X 3 X

thats the "swamp" area with 3 entrances (doesn't have to be rectangular)

create 2 regions next to each other at every entrance. the inner region is SwampEnter and the outer one is SwampExit. make sure the unit has to walk over the region when entering/leaving the swamp.

the rest is triggered

trigger 1 (unit enters swamp)
Code:
Event: 
Unit Enters Region: SwampEnter1
Unit Enters Region: SwampEnter2
Unit Enters Region: SwampEnter3

Conditions: 
SwampEntered = false

Actions:
Game - Text Message: Entered Swamp
set SwampEntered = true

trigger 2 (unit exits swamp)
Code:
Event: 
Unit Enters Region: SwampExit1
Unit Enters Region: SwampExit2
Unit Enters Region: SwampExit3

Conditions: 
SwampEntered = true

Actions:
Game - Text Message: Exited Swamp
set SwampEntered = false

SwampEntered is a global boolean variable

EDIT: things like that are the most basic logical solutions. people here took their time to give you the right pieces i think you could at least try to puzzle them together to get your answer
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      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