Building destroyed after reviving a hero.

Status
Not open for further replies.
Level 8
Joined
Feb 11, 2016
Messages
238
Now is time to help me. I want make trigger that my building (Post Lantern) destroy after finishing reviving a hero. But something in second trigger don't working, please help me. Thank you.
upload_2017-9-23_12-37-24.png
 
Level 4
Joined
Apr 28, 2017
Messages
112
  • Smrt heroja
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set tempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Post Lantern for (Owner of (Triggering unit)) at tempPoint facing Default building facing degrees
      • Set tempUnit = (Last created unit)
      • Custom script: call RemoveLocation(udg_tempPoint)
  • Ponovo radanje heroja
    • Events
      • Unit - A unit Finishes reviving
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to <select your unit here>
    • Actions
      • Unit - Remove tempUnit from the game
You will need to create 2 variables for this. tempUnit is unit-type, and tempPoint is point variable (leave default values).
You need a point variable coz your trigger had a leak, and Custom script: call RemoveLocation(udg_tempPoint) is used to removethat leak.

I also added condition to second trigger, to work better
 
Level 4
Joined
Apr 28, 2017
Messages
112
I can't do this, I need step by step for this two variables, if someone know and want spend his own time to me, I will be really thank you.

Ok I figure you know how to open trigger editor since you posted that trigger. When you open trigger editor, click CTRL+B (or 9th icon from the left). There you click CTRL +N (or "new variable", that green X). Add whichever name you want, but i suggest you used one I posted. And for variable type you select whichever you need (I told in post above which variable types you need).

When writing a trigger right after you right click and select "add new actions" just press "S" on keyboard when screen pops up, and it will select "Set Variable = value". You should know the rest, as i Posted entire trigger above
 
Level 8
Joined
Feb 11, 2016
Messages
238
OK, I actually know how to do this, I just was to fast and don't read all this carefully. I have only two more problems. "set tempUnit = (Last created unit)" - I can't find last created unit opinion; and "Unit - Remove tempUnit from the game" - I can't find opinion "tempUnit" (variable what I made). Thank you you helped me a lot.
 
Level 4
Joined
Apr 28, 2017
Messages
112
OK, I actually know how to do this, I just was to fast and don't read all this carefully. I have only two more problems. "set tempUnit = (Last created unit)" - I can't find last created unit opinion; and "Unit - Remove tempUnit from the game" - I can't find opinion "tempUnit" (variable what I made). Thank you you helped me a lot.

Here's the map with triggers & variables. Just copy paste the trigger into your map (google how to do it if you don't know). Only thing you need to change in it is the unit that is created. So change "footman" to your "lamp post".
 

Attachments

  • test.w3x
    16.2 KB · Views: 51
Level 8
Joined
Feb 11, 2016
Messages
238
Why you simply don't said me step by step how to make it? I copy/paste triggers and don't working, there is some error, "nothing returning back..." and something like this, I don't understand, is this my WE old version or what?
 
Level 4
Joined
Apr 28, 2017
Messages
112
Why you simply don't said me step by step how to make it? I copy/paste triggers and don't working, there is some error, "nothing returning back..." and something like this, I don't understand, is this my WE old version or what?

Because there are plenty of trigger guides here already, and I already literally told you step by step guide and which buttons to press a few posts above
 
Level 8
Joined
Feb 11, 2016
Messages
238
Same two problems like I said before, there is no "last created unit", there is no even list with opinions, just few of them and there is no "tempUnit" as a opinion is second trigger, WE don't have it, so can't working with it, copy/paste don't helping, when I open your test map, it's work, and I copy/paste it and my map can't load this. WTF is going on, my WE sucks.
 
Level 4
Joined
Apr 28, 2017
Messages
112
Same two problems like I said before, there is no "last created unit", there is no even list with opinions, just few of them and there is no "tempUnit" as a opinion is second trigger, WE don't have it, so can't working with it, copy/paste don't helping, when I open your test map, it's work, and I copy/paste it and my map can't load this. WTF is going on, my WE sucks.

When you open world editor, go FILE (top left corner of the screen) -> Preferences -> General tab and check the box "automatically create unknown variables while pasting trigger data", then click OK. Now you can copy paste it from my map, and variables will create itself
 
Level 4
Joined
Apr 28, 2017
Messages
112
Hahahaha, thank you, but I already know this, I do this and as I said I copy/paste your triggers but don't work.

You said yourself they work when you test it on the map I sent you.... so only logical explanation is that you made a mistake while copying them :D. I told you everything I could, there's literally nothing else I can do to help you. Maybe there's some youtube step-by-step tutorial how to copy triggers, you should go check them out
 
Status
Not open for further replies.
Top