• 0

    posted a message on Simple trigger help

    Tell me if I'm wrong, but it sounds like you have one (or more) "shops" in one part of the map, and want the units bought in the shop to automatically teleport to a certain point.

    I would use the old WC3 trick: Use the event "A unit enters <Region> - (Entire Map)". Any unit that is created/trained/bought/etc enters (Entire Map). Now all you need to do is to check the unit-type under conditions, and then run your actions:

    Unit - Move (Triggering unit) instantly to *Point*

    Posted in: Triggers
  • 0

    posted a message on "GetLargestReal"

    Hi.

    I have four reals that changes values as the game progress. They are each part of the same variable (array, size 4) - called "Damage".

    Now I want to compare these values to find out which one is highest. I also want to check if the two highest values are the same - aka a stalemate.

    If a player isn't playing the value is 0.0 by default, so that's not a problem.

    I don't mind a custom script solution to the problem. I don't know how to turn the trigger into custom script, though. (In WC3 it was under 'Edit -> Turn into custom text', but not anymore?)

    Thanks in advance.

    EDIT: First problem solved with a simple loop. I can now determine which value is largest by doing this:

            General - For each integer i from 1 to 4 with increment 1, do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            maxvalue < Damage[i]
                        Then
                            Variable - Set maxvalue = Damage[i]
                            Variable - Set winner = i
                        Else
    

    I still don't know how to find out if the highest two values (or more) are the same. (Stalemate.)

    Posted in: Triggers
  • 0

    posted a message on Debris dies when nearby debris dies.

    Yep, that was it. Awesome, thanks. =)

    Posted in: Data
  • 0

    posted a message on Debris dies when nearby debris dies.

    Hi.

    I'm making a TD. One of the towers is just for blocking. It's based of the "Braxis Alpha - Destructible Debris (1x1)" unit.

    Here's the problem: If I build two (or more) of these blockers next to each other, and one of them dies - for example being sold. All nearby blocker-towers disappear as well. =/

    EDIT: Actually it doesn't matter if the blocker towers are near eachother or not. -ALL blocker towers that I own are removed. (I dunno about allies blocker towers, etc - haven't been able to test.)

    In the Data Editor I saw that the debris unit has a behaviour called "Terrain Mod - Conjoined" - is this what causes my problem? If so, how can I get rid of it? If not, then what is?

    Thanks in advance.

    Posted in: Data
  • 0

    posted a message on Data Editor too complicated for me

    Thank you. I managed to create one, simple tower so far. =)

    I'm sure I will get back to you with more questions later on. :P

    Posted in: Data
  • 0

    posted a message on Data Editor too complicated for me

    Hi.

    Just as the title suggests; the Data Editor is too complicated for me. I'm having tons of trouble figuring the simplest things out.

    At the moment I'm trying to make some sort of TD (with a twist). And as well all know; TD's demand a lot of unit editing. So this is really a problem for me.

    My first problem is my Worker unit. -I want to create a custom build list for my Worker, but don't know how to do it.

    I based my Worker on a Probe, because I wanted the towers to warp in. (Not sure if it matters, like in WC3.)

    I have created a custom tower based on auto-Turret, called 'Turret'. Now I would like to enable my Worker to warp this Turret in. (I don't want to require pylons, btw.)

    EDIT: I would also like my Turret to not have Timed Life. (I haven't been able to actually build it yet, so I'm not sure if it does or not.)

    Posted in: Data
  • 0

    posted a message on Electric effects

    I wanna try the Psi Storm you suggested. Any ideas on how to make a huge psi storm effect and put it in the middle of the room via triggers?

    I tried this:

                    Variable - Set g = (Any units in Science_Lab owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)
                    Unit Group - Pick each unit in g and do (Actions)
                        Actions
                            Environment - Execute High Templar - Psi Storm (Apply Buff) on (Picked unit) from (Picked unit)
                            General - Wait 2.0 Real Time seconds
                            Unit - Kill (Picked unit)
    

    I did not see any effects what so ever. The zerglings died, though. (There are like four different Psi Storm Effects, I dunno which one to choose.)

    Bonus question: When using the code-tags here on Sc2mapster, am I supposed to use "lua"?

    Posted in: Triggers
  • 0

    posted a message on Electric effects

    Hi.

    I would like to create effects that looks like the floor is being electrified, killing everyone in the room.

    Any ideas on what effects I should use?

    Posted in: Triggers
  • 0

    posted a message on Cinematic with mouse?
    Quote from wOlfLisK: Go

    'Hide Game UI'

    Hides everything, but keeps the pointer.

    Thank you. That was just what I needed. =)

    Posted in: Triggers
  • 0

    posted a message on Cinematic with mouse?

    Hi.

    I want to remove most of the UI (just like in Cinematic mode), but I need the mouse pointer.

    This is for a security camera, with dialog buttons on the side.

    Posted in: Triggers
  • 0

    posted a message on Function that returns action

    "The best thing you can do is to insert the If-then directly into the main trigger." -That is what I'm trying to avoid. I'm trying to take it out of the main trigger, to make the code look cleaner. :P

    I guess this can't be done, then. =(

    Thanks for trying.

    Posted in: Triggers
  • 0

    posted a message on Make a unit unable to attack, via trigger?

    Thanks. I will try that.

    Is it just as simple to return the unit's attack ability, later?

    Posted in: Triggers
  • 0

    posted a message on Function that returns action

    I have changed it from Function to Action. I dunno what 'action definition' is.

    I have managed to remove the need for a return. But I want it to return 'Skip remaining actions' - else it won't work.

    I have no idea how to make it return 'Skip remaining actions', though.

    Posted in: Triggers
  • 0

    posted a message on Function that returns action

    The Trigger Editor expects a return function.

    EDIT: I changed the Return to (None). However, the 'Skip remaining actions' does not occur in the "main trigger".

    Posted in: Triggers
  • 0

    posted a message on Function that returns action

    Hi.

    I wanna make a simple function that returns a specific action - namely 'Skip Remaining Actions'.

    Here's what I want the function to do:

            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Skip_Cinematic == true
                Then
                    General - Skip remaining actions
                Else
    

    So I figured I'd put this in a function somehow, and run an action in the actual trigger (which does this check) and if it's true; return 'Skip Remaining Actions'.

    I just can't figure out how to return 'Skip Remaining Actions'.

    Posted in: Triggers
  • To post a comment, please or register a new account.