• 0

    posted a message on Create new unit inside Nydus

    Use Create Cargo Units and Issue Order To Unit

            Unit - Create <N> <Type> as cargo in <Unit>
            Unit - Order <Unit> to ( Unload All (Nydus Canal)) (Replace Existing Orders) // or which Load/Unload Ability you use
    

    Cheers Then

    Posted in: Data
  • 0

    posted a message on How to make Rain apper in game ? (Question)
    Quote from zeldarules28: Go

    I did this myself for a map. You run a some loops to periodically increase X and create a rain emmiter at X,Y. When X reaches the map bounds, it gets reset to 0 and Y is incremented by however much you want. This covers the entire map in rain emmiters, which DO create rain, I know this for a fact.

    Done something like that, too, and it worked fine.

    Posted in: Triggers
  • 0

    posted a message on How to make Rain apper in game ? (Question)

    Other method is creating a Actor with triggers where u need the rain. There exist several rain actors/doodads wich u can use.

    Cheers Then

    Posted in: Triggers
  • 0

    posted a message on Bank problems.

    @Deeweext: Go Theres no problem about.
    You would have a great benefit using local variables if you sometimes have to change Triggering Unit to a other method like eg. Killing Unit.

    Then you have a lot of work ;)

    Posted in: Triggers
  • 0

    posted a message on Bank problems.
    Quote from Rushhour: Go

    Try storing the owner in a local variable and see what comes out.

    This could realy solve the problem.
    Because a unit will be removed from the game after death (if you don't set the the deathtime in unit stats). After that Triggering Unit points to nothing and you get an exception because your array index gets -1.

    So here are the solutions:

    • Set Stats- Deathtime to e.g. 30sec so the Hero is not removed when you want to use it for indexes
    • or save the playernumber in a local variable so you are independet from the hero variable

    BTW:

    Quote from 38dedo: Go

    The variables are all global, and if I wouldn't use the [owner of triggering unit -1] i would have to copy and phaste 10 times and change it from 0-9 since there are 10 players and each one has its slot in the array, player one has [0], player 2 has [1] etc...

    Triggering Unit, Last restored Unit etc. are functions that grant access to (local) variables wich are linked with each trigger execution.
    The clue with local vars is that u write instead of

        Local Variables
        Conditions
            Or
                Conditions
                    (Triggering unit) == HeroUnits[0]
                    (Triggering unit) == HeroUnits[1]
                    (Triggering unit) == HeroUnits[2]
    

    something like this:

        Local Variables
            hero = (Triggering unit) <Unit>
        Conditions
            Or
                Conditions
                    hero  == HeroUnits[0]
                    hero  == HeroUnits[1]
                    hero  == HeroUnits[2]
    

    Now you can easly change the all your comparision stc without clicking through all but only changing the definition of hero.

    Cheers Then

    Posted in: Triggers
  • 0

    posted a message on Return Region of a triggering Unit

    Wich region do you mean?

    • Region the unit is in
    • Region around the Unit
    • Region around the Target

    Cheers
    Then

    Posted in: Triggers
  • 0

    posted a message on Change unit color by trigger @runtime

    @Ideath999: Go

    I think theres a library for doing this.
    See this: http://forums.sc2mapster.com/resources/trigger-libraries/13549-library-color-chooser-v-0-3/

    Cheers
    Then

    Posted in: Triggers
  • 0

    posted a message on Keeping track of kills problem
    Quote from IsoRev: Go

    your condition is messed up. the condition has to apply to the event. so what fires the trigger is when any unit dies. that has nothing to do with the triggering player. an example of triggering player is when a played uses a dialog item or leaves the game. you haev to change that to the owner of the triggering unit also with the action in your second trigger. needs to say owner of triggerint unit. you also want to just modify the global variable, dont set it.

    Quote from Unit Dies Event Hint:

    Use "Triggering Player" to get the owner of the unit that died.

    Triggering Player is possible, but would refer to the false Player.
    What you can use here is Killing Player or Owner of (Kiling Unit) to get the Player, wich killed the Unit.

    Cheers
    Then

    Posted in: Triggers
  • 0

    posted a message on Little question about "execution took to long"

    @uiasdnmb: Go

    i don't have endless loops, but a function with many for-loops wich I can't leave. so adding waits could maybe solve that error?
    hmmm, let's test is out... :)

    Posted in: Triggers
  • 0

    posted a message on Little question about "execution took to long"

    @LinkD: Go

    so if you add a wait, this ould not occure?

    Posted in: Triggers
  • 0

    posted a message on Destroy all units in region

    @jmzg0: Go

    You can do this either using "Pich Each Unit In Unit Group":

            Unit Group - Pick each unit in (Any units in <Region> owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
                Actions
                    Unit - Kill (Picked unit)
    

    Or using a separate Variable and "For Each Unit In Unit Group":

        Local Variables
            _unit = No Unit <Unit>
        Actions
            Unit Group - For each unit _unit in (Any units in <Region> owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) do (Actions)
                Actions
                    Unit - Kill _unit
    

    Cheers
    Then

    Posted in: Triggers
  • 0

    posted a message on Help With Triggers - Checkpoints

    @NarcoticNite: Go

    As long as Saving in Multiplayer is not possible (AFAIK) you have to use Variables or the Bank System to save all necessary Data. When your Hero dies, just reload all Data...

    Cheers
    Then

    Posted in: Triggers
  • 0

    posted a message on Specified number of units in a region?

    This could do your job, but I haven't tested it...

    Spawn Unit
        Events
            Unit - Any Unit Enters <Money Region>
        Local Variables
            i = 0 <Integer>
            group = (Empty unit group) <Unit Group>
        Conditions
            (Unit type of (Triggering unit)) == <Type of Money Unit>
        Actions
            Variable - Set group = (<Type of Money Unit> units in <Money Region> owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Number of Living units in group) >= <Unit Cost>
                Then
                    General - For each integer i from 1 to <Unit Cost> with increment 1, do (Actions)
                        Actions
                            ------- Kill or remove Unit - your choice
                            Unit - Kill (Random Living unit from group)
                    Unit - Create 1 <Type of created Unit> for player (Owner of (Triggering unit)) at <Spawn Location> using default facing (No Options)
                Else
    

    Maybe you have to change the Group Condition Any Player to (Owner of (Triggering Unit))

    Edit: Forgot Unit spawn, sry ;)

    Cheers
    Then

    Posted in: Triggers
  • 0

    posted a message on Grammar Text

    Ok, thanks.
    Maybe this is fixed in the next Patch...

    Cheers
    Then

    Posted in: Triggers
  • 0

    posted a message on Grammar Text

    Any way to change it?
    E.g. by editing the Library File?

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