Staredit Network > Forums > SC2 Assistance > Topic: [Solved] Diplomacy type trigger
[Solved] Diplomacy type trigger
This topic is locked. You can no longer write replies here.
Jun 19 2011, 10:20 pm
By: Veta  

Jun 19 2011, 10:20 pm Veta Post #1



Hi there,

I'm new to triggering on SC2 and I was wondering how I would go about making something like this:

I want a certain building (representing a city) that when destroyed respawns in the location it was placed and changes possession to the player that killed said city. If possible I would like to do this with any number of these buildings around a given map without an individual trigger/location for each. If there is an intuitive and simple way to do this that is what I'd like know. If this requires the data editor I would also like to know what is necessary in that case.

Thank you!



None.

Jun 19 2011, 11:20 pm Roy Post #2

An artist's depiction of an Extended Unit Death

RespawnUnitForKillingPlayer
      Events
            Unit - Any Unit dies
      Local Variables
            unitType = (Unit type of (Triggering unit)) <Game Link - Unit>
            killingPlayer = (Owner of (Killing unit)) <Integer>
            deathPoint = (Position of (Triggering unit)) <Point>
      Conditions
            Or
                  Conditions
                        unitType == Supply Depot
                        unitType == Barracks
                        unitType == Pylon
      Actions
            Unit - Create 1 unitType for player killingPlayer at deathPoint using default facing (No Options)


Basically, on the event where a unit dies, you want to check if that unit is the certain unit you want. In the example above, this checks if the unit is a supply depot, barracks, or pylon. Then you just need to grab the killing player and the position of the dying unit. I put them in color-coded variables so you can see them easily.

If you only need to do this for one type of unit, you don't need the "Or" condition.

Hope this helps!




Jun 19 2011, 11:31 pm Veta Post #3



Wow thank you so much, I'm going to try to implement this later. If I have any trouble I'll come back here.

Once again though, that was really helpful.

Edit 1: Under variables I can't seem to find killingPlayer, I foudn unitType though.

Edit 2: never mind figured it out, (seriously like the first trigger I've ever made on galaxy) thank you again

Edit 3: Question do I need to add a preserve trigger to make this trigger fire always?

Post has been edited 2 time(s), last time on Jun 20 2011, 1:20 am by Roy. Reason: Don't double/triple/quadruple post



None.

Jun 20 2011, 1:20 am Roy Post #4

An artist's depiction of an Extended Unit Death

No, everything is assumed as preserved unless you disable the trigger (there's an action called "Turn Trigger On/Off").




Jun 20 2011, 3:53 am Veta Post #5



Thanks mate, I ended up figuring it out but you've been very helpful. Gonna send some good karma your way.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: Ultraviolet