• 0

    posted a message on Problem with unit variable and rescue trigger

    @Shawn91210: Go

    i already tried that and unfortunately, there is another trigger related to region that doesn't like region variable... So I stumble upon the same problem with just a different variable...

    I created a new reagion and moves it on the Science Lab, then made a unit enter region event... You can get around, but that just damn frustrating...

    Posted in: Triggers
  • 0

    posted a message on Problem with unit variable and rescue trigger

    @Claymuffin: Go

    The Question is : Is there any way in hell to change the event of this trigger to (Unit - Any Unit Enters a distance of 5.0 from "Unit Variable") It seem that this trigger is not unit variable friendly as SouL CarveRR said it earlier...

    Anybody know how to bypass this?

    I could do it by placing the unit on the map, but I hate that and it's what I'm trying to avoid. I create all my unit, regions and point by trigger for map initialisation...

    Zhakul'Das Activation 2
    
        Events
    
            Unit - Any Unit Enters a distance of 5.0 from Science Facility [160.50, 163.50]
    
        Local Variables
    
        Conditions
    
            (Race of player (Triggering player)) == Terran
    
            ------- Set player active propriety to terran and hostile to zerg. 
    ------- If not, the trigger wont work properlly
    
        Actions
    
            Unit - Change ownership of Zhakul'Das Library 2 to player 6 and Change Color
    
            Sound - Play StoneZealot_Death for (All players) (at 100.0% volume, skip the first 0.0 seconds)
    
            Unit - Order Zhakul'Das Library 2 to ( Raise Library) (Replace Existing Orders)
    
    Posted in: Triggers
  • 0

    posted a message on Problem with unit variable and rescue trigger
    Quote from SouLCarveRR: Go

    Enters/ Leave Events must use a static object.... doesnt ussually like variables.

    By static object I mean something that is pre-placed in the terrain editor.

    What you can do is make a region. And during your game move this region around as needed.....

    I found a similar post taking about that tricky event I'm using... Here is the answer.. or is it?

    Posted in: Triggers
  • 0

    posted a message on Problem with unit variable and rescue trigger

    Strangely, I stumbled upon a cluess obstacle... With variable.

    The problem is in the event of the rescue science lab 1 trigger : Unit - Any Unit Enters a distance of 2.0 from ==== Unit ====

    The first unit is ok as it souhld be triggered by any units getting near the science lab 1 unit. But the second ==== unit ==== value SHOULD be "Science Lab 1" unit variable. I really dont get it... Why can't I set it?

    And take into consideration that that building is trigger created, so there is no porrible real value for it. It has to be via variable.

    Science Lab 1 = (Last created unit) <Unit>

    Science Lab 2 = (Last created unit) <Unit>

    Science Lab
    
        Events
    
            Game - Map initialization
    
        Local Variables
    
        Conditions
    
        Actions
    
            Unit - Create 1 Science Facility for player 0 at (Random point in Positive Playable Map Area) facing 270.0 degrees (No Options)
    
            Unit - Set (Last created unit) Life (Percent) to (Random real between 40.0 and 100.0)
    
            Variable - Set Science Lab 1 = (Last created unit)
    
            Unit - Create 1 Science Facility for player 0 at (Random point in Positive Playable Map Area) facing 270.0 degrees (No Options)
    
            Unit - Set (Last created unit) Life (Percent) to (Random real between 40.0 and 100.0)
    
            Variable - Set Science Lab 2 = (Last created unit)
    
    Rescue Science Lab 1
    
        Events
    
                    Unit - Any Unit Enters a distance of 2.0 from Unit
    
        Local Variables
    
        Conditions
    
            (Race of player (Triggering player)) == Terran
    
            ------- Set player active propriety to terran and hostile to zerg. 
    ------- If not, the trigger wont work properlly
    
        Actions
    
            Unit - Change ownership of Science Lab 1 to player 6 and Change Color
    

    ...

    Posted in: Triggers
  • 0

    posted a message on Unit in region = true/fasle (and) loop/break trigger

    @ZealNaga: Go

    Ty very much, It tried it and it's pretty neat. It's a little hard for me to understand, but I will eventually get through it. I don't want to copy it from your or I wont be able to fix it or modifie it properlly...

    I have other questions related to it, but I might come back for them in acouple of days... thats a lot of new stuff for me :D

    Posted in: Triggers
  • 0

    posted a message on Random Trigger, Value, Integer and Region

    @ZealNaga: Go

    Finally, it's not working properlly. The negative region doesn't do his job and some stuff still spawn in it...

    I looked if it would be a staking problem and if I had to specifie which region was on top... But I don't find it. Maybe the problem is somewhere else?

    Posted in: Triggers
  • 0

    posted a message on Random Trigger, Value, Integer and Region

    @SouLCarveRR: Go

    Tx for the advice, I wont be doing it.

    Right now, I'm just randoming point in area less a negative region. The region in which I random point is a positive. Should not be causing problem...

    Posted in: Triggers
  • 0

    posted a message on Random Trigger, Value, Integer and Region

    @ZealNaga: Go

    It's working perfectly.

    Now next Question about random stuff...

    I whish to integrate a lot of it in the gameplay and make some event only happen once every 3-4 game. Something like :

    Map initialisation Generate random real between 0 and 100

    If integer is = or less than 30, spawn ultralisk at random point on playable area if integer is more than 30, do nothing

    Turn off current trigger

    ___

    I Made it :

    Random Rich Mineral Field Spawn Integer 1 = (Random integer between 0 and 100) <Integer>

    Random Rich Mineral Field Spawn 1 30%
    
        Events
    
            Game - Map initialization
    
        Local Variables
    
        Conditions
    
        Actions
    
            General - If (Conditions) then do (Actions) else do (Actions)
    
                If
    
                    Random Rich Mineral Field Spawn Integer 1 <= 30
    
                Then
    
                    Unit - Create 1 Rich Mineral Field for player 0 at (Random point in Random Playable Map Area) facing 270.0 degrees (No Options)
    
                    Trigger - Turn (Current trigger) Off
    
                Else
    
                    Trigger - Turn (Current trigger) Off
    
    Posted in: Triggers
  • 0

    posted a message on Random Trigger, Value, Integer and Region

    @rkmx52: Go

    Yea, there is a geometrical way to make a square with a hole in the center, but thats not what I'm searching for, Even then, I still don't know how to make a trigger choose randomly between 4 regions.

    I'm sure there is a simpler way to acheive this, no?

    Posted in: Triggers
  • 0

    posted a message on Random Trigger, Value, Integer and Region

    In the map I'm working on, I want to make tons of stuff randomized. it include the following and many more to come...

    Bridge location, mineral/gas amount on the mineral field/gas geiser, enemie units spawning points, presence of unit / item / buildings or not

    I'm encountering lots of problems while basing a map gameplay on random stuff. I discovered that random must still be not sooooo random...

    First exemple : Here is a trigger to create a mineral field containing a andom amount of mineral situated in a region which is on a random point of the playable area... Basically, the mineral could be anywhere, but I discovered that it needed some restriction.

    The up to date is that I want to restrict the random region placement (mineral field) to playable area minus a region in the center of the map. In other words, the mineral can be anywhere exept to restricted area which are region (or will be I suppose)

    Here is the trigger up to date... I searched a lot in condition, but ound nothing like : If X Region is in Y Region = true (do not spawn mineral)

    Random low value mineral spawn Agglomeration 1
    
        Events
    
            Game - Map initialization
    
        Local Variables
    
        Conditions
    
        Actions
    
            Unit - Create 1 Low Value Mineral Field (ST) for player 0 at (Random point in Mineral Agglomeration 1) facing (Random angle) degrees (No Options)
    
            Unit - Set (Last created unit) Resources to (Random real between 60.0 and 130.0)
    

    Anybody already faced that problem? The map called Stranded on Krydon had such a tigger...

    Posted in: Triggers
  • 0

    posted a message on Unit in region = true/fasle (and) loop/break trigger

    @ZealNaga: Go

    Actually, thats the case, because both of these region are stacked on top of each other. The warning region is bigger than the one spawning the nydus, you can get two unit in the warning region without entering the other region that trigger the nydus and turn the warning off.

    I was thinking about a condition that would be like this : If any units in region = 2 or more than 2, Clear all instance and turn of trigger.

    Unfortunately, I know it will require math integer, and I'm not quite there yet with the trigger editor...

    Also, here is the new attack order trigger

    Spawn Nydus 1-6 Attack Order
    
        Events
    
            Unit - General Nydus 1 Unloads cargo
    
        Local Variables
    
        Conditions
    
        Actions
    
            Unit - Order all units in Nydus Zergling to ( Scan Move targeting (Random point in (Playable map area))) (After Existing Orders)
    

    This second trigger is supposed to remove each zergling from the group as soon as it receive it's first
    scan move order. it should prevent the unit from receiving multiple orders. Strangely, all the glings scatter randomly untill they reach a target, they will all attack the same target and loop that order each 6-7 second... (if the nydus it still spitting gling of course) I'm clueless XD

    <<code>>

    Spawn Nydus 1-6 Attack Order 2

    Events

    Unit - Any Unit is issued an order to Scan Move

    Local Variables

    Conditions

    ((Triggering unit) is in Nydus Zergling) == true

    Actions

    Unit Group - Remove (Triggering unit) from Nydus Zergling

    <</code>>

    Posted in: Triggers
  • 0

    posted a message on Unit in region = true/fasle (and) loop/break trigger

    @ZealNaga: Go

    Ty very much man, almost everything fixed up and I event simplified lots of stuff with your help.

    The only thing is that the event General Nydus 1 Unloads cargo is triggered everytime a unit is unloaded and a new order is give to all lings in unit group each time. That make all the zergling attack the same point instead having eache of the atacking a random point in the map playable area. (I want the lings to scatter all over the map).

    Haven't had the time to search a lot, I have an exam... I'll give more time to it tonight, it should be fairly simple with variable.

    Remove unit from unit groupe (variable Last unloaded unit) 0.5 sec after unit is unloaded... Something like that I guess...

    Edit : I just tough about it... Lastly, I'm gonne try to make the warning region only trigerred by ONE unit at a time. If 10 units enter, it just repeat itself 10 time at the same time and loop. I don't want that either.

    Posted in: Triggers
  • 0

    posted a message on Unit in region = true/fasle (and) loop/break trigger

    @ZealNaga: Go

    Edit 1: (Before I fix the Spawn Nydus 1 trigger) None worked ZealNaga... Unfortunately... Might be my manipulation though.

    Edit 2 : There was a mistake in the first trigger (the one responsible for the nydus spawning when a unit enter a region). Now I made the trigger turn off immediately so a nydus will never spawn again at the same trigger.

    Spawn Nydus 1
        Events
            Unit - Any Unit Enters Spawn Nydus 1
        Local Variables
        Conditions
            (Race of player (Triggering player)) == Terran
            ------- Set player active propriety to terran and hostile to zerg. 
    ------- If not, the trigger wont work properlly
        Actions
            Trigger - Turn (Current trigger) Off
            Unit - Create 1 Nydus Worm (Canal) for player 15 at (Center of Spawn Nydus 1) facing (Random angle) degrees (No Options)
            Variable - Set General Nydus 1 = (Last created unit)
            Animation - Play Birth animation for (Actor for General Nydus 1) as Default, using No Options options and Default Time blend time
            Sound - Play NydusWorm_Birth for (All players) (at 100.0% volume, skip the first 0.0 seconds)
            Camera - Shake the camera for player 1 for 2.5 seconds, with strength 1.0, frequency 2.0 Hz, and 100.0% randomness (Position: Target, Direction: Z)
            Unit - Create 40 Zergling as cargo in General Nydus 1
            Variable - Set Nydus Zergling = (Last created unit)
            General - Wait 4.0 Game Time seconds
            Unit - Order General Nydus 1 to ( Unload All (Nydus Canal)) (Replace Existing Orders)
    

    Also There is still a problem with the warning trigger... I'm getting pissed off by now XD

    If I kill the nydus while it's still playing it's birth animation, it does not take in consideration the third condition and the warning sound and shake still play in loop until I leave the warning trigger circular zone. I'm starting to get lost in logical problems...

    The warning sound and shake should stop the moment the nydus spawn... But I suspect the problem to come from my event, since it only trigger all of it when a unit ENTER the zone. But, that does not explain that the warning stop when I LEAVE the zone (nydus spawned or not, it doesn't matter).

    Tell me guys if i'm the only one understanding myself XD

    Spawn Nydus Warning 1
        Events
            Unit - Any Unit Enters Spawn Nydus Warning 1
        Local Variables
        Conditions
            (Race of player (Triggering player)) == Terran
            ------- Set player active propriety to terran and hostile to zerg. 
    ------- If not, the trigger wont work properlly
        Actions
            General - Repeat (Actions) forever
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            ((Triggering unit) is alive) == true
                            ((Triggering unit) is in Spawn Nydus Warning 1) == true
                            (General Nydus 1 is in Spawn Nydus 1) == false
                        Then
                            Sound - Play Ultralisk_Pissed for (All players) (at 55.0% volume, skip the first 0.0 seconds)
                            Camera - Shake the camera for player (Triggering player) for 2.0 seconds, with strength 0.05, frequency 0.1 Hz, and 100.0% randomness (Position: Target, Direction: Z)
                            General - Wait 6.0 Game Time seconds
                        Else
                            General - Break
                            Trigger - Turn (Current trigger) Off
    

    I also added a third trigger to stop the warning, since I don't know another way. It does'nt seem clean though... I'm effraid that even if my trigger works fine, it might bug out more eventually since everything is not working smothly.

    Spawn Nydus 1 Total Stop
        Events
            Unit - Any Unit Enters Spawn Nydus 1
        Local Variables
        Conditions
            (Race of player (Triggering player)) == Terran
            ------- Set player active propriety to terran and hostile to zerg. 
    ------- If not, the trigger wont work properlly
        Actions
            Trigger - Turn Spawn Nydus Warning 1 Off
    
    Posted in: Triggers
  • 0

    posted a message on Unit in region = true/fasle (and) loop/break trigger

    Bumb

    And edit...

    I found with further testing that even if the nydus worm die, the warning trigger dosen't turn off, why is that so?

    When I kill it, it stop, but if I enter the zone again it trigger the warning again... It should be turned off...

    Posted in: Triggers
  • 0

    posted a message on Creating region and point via trigger

    @Tolkfan: Go

    I took some time to look at it and it's exactly what I was searching for. Now, I have to work on this
    a little because the last thign I need to do it find out how to do the same with "point" and behing able
    to place the to (X,Y) coordinate.

    __

    Edit : it works

    Variable
    Point Meteo 1 = (Point(30.0, 30.0)) <Point>

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