• 0

    posted a message on Trigger with unit loop executes multiple times.

    Well... I am not 100% certain of the cause than, it might have something to do with the fact you're killing all of those units.

    Every unit that is killed it's running the trigger again.

    So essentially you're running that trigger a very large amount of times...

    but you kind of canceled that with your last statement.

    You can try placing a very small wait in the loop for kill unit U such as 0.05 ticks.

    As it was suggested (Kind of) earlier I suggest adding a event for each player, each being to the specific building each one owns, this will cut down on condition checks by a lot making it much more efficient as it wont push a kill event and check a condition on a game all about mass killing.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Trigger with unit loop executes multiple times.

    Interesting because it works perfectly for me...

    About how many units do you have on the map at once when this happens?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Trigger with unit loop executes multiple times.

    The trigger seems solid (even tested) however are you sure there's no other triggers conflicting with it somehow?

    Do you have a revive trigger after they die?

    Do you have any triggers that make a ' Special Building ' unit.

    Do you have more than one ' special building ' unit?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Convert Doodad to Unit

    You can duplicate a unit and give it the model of a doodad, you may need to adjust collision size, etc...

    Posted in: Miscellaneous Development
  • 0

    posted a message on Points, and the fog of war.

    How about using ' Distance '.

    So in other words take closest unit to point X than check if that distance < a units sight range.

    I don't see a quick way to grab a units sight radius so you can assume an average, for example a marines is 9.

    You could also take each unit and make the sight radius a grab-able copy, such as if you don't plan on making units buildable use their mineral value as that is grab able. So you would look at the units sight radius and change its minerals to 9, have the trigger grab the units mineral cost for range/distance.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Making a rocket launcher (missile that collides with objects in its way)?
    Quote from QuantumMenace: Go

    I've been interested in this sort of thing since the editor came out, and found a way to do it with zero triggers. Here's a test map:

    I really like your rockets there, I am going to throw it onto an ability and consider using its core.

    I assume the same thing can be done with non-missiles such as regular marine fire, if not making the missile invisible and splash effect being a marine fire... if so I would love to get a copy of that as well that or a tutorial ;)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Making a rocket launcher (missile that collides with objects in its way)?

    I created a trigger fire/collision system for my side-scroller. It has a baneling with a model of a missile and have I it so when it comes in a certain distance and height of a unit it explodes. It adds every missile fired to an array and adds all enemy units to a unit group and does comparisons on distance.

    I also have it complicated where there's two missile types, one in the air and one on the ground as splash radius is 2d not 3d.

    I am taking a look at the data way though.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Points, and the fog of war.

    Is there any way you can provide more information on the situation?

    There's a condition trigger, ' (X UNIT) is visible to player X == True/False '.

    Therefore if a unit is visible you can initiate it.

    Also entering a region may be a better way depending on the circumstances.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Help with "Respawn" Trigger

    Suggestion 1: Post your current code, right-click, copy as text, paste into the Code tags (aka click the gears above editing your post).

    Without looking at your code even I think your problem is you're using a timer for one and it is running too many functions too fast as there's no waits.

    1. Remove your timer event.

    2. Add a EVENT - UNIT DIES for the event.

    I don't suggest timers unless you need to use them.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Issue with Unit Enters/Leaves Range of Unit

    Can you place your code above in code quotes so it is easier to read? Thanks!

    I believe a lot of events just store the static information of a unit position and does not fetch the latest dynamic points.

    One way to do what you are wanting is this for example:

    Distance
        Events
        Local Variables
            CurrentUnit = No Unit <Unit>
        Conditions
        Actions
            General - While (Conditions) are true, do (Actions)
                Conditions
                    ((Current trigger) is on) == true
                Actions
                    Unit Group - Add all units in (Any units in (Entire map) owned by player 5 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) to Helions
                    Unit Group - For each unit CurrentUnit in Helions do (Actions)
                        Actions
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    (Unit type of CurrentUnit) == Hellion
                                    (Distance between (Position of HeroUnit) and (Position of CurrentUnit)) <= 1.0
                                Then
                                    Unit - Remove HeroUnit from the game
                                    Unit - Change ownership of CurrentUnit to player 1 and Change Color
                                    Trigger - Turn (Current trigger) Off
                                Else
                    General - Wait 0.3 Game Time seconds
    

    You will need to make it so when the unit leaves the hellion and when the map initializes that it runs the trigger.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Random Encounters.

    Yes, != means not equal to.

    I suggest moving the (Owner of (Triggering unit)) == 15 above the ' NOT ' and deleting the NOT condition.

    Also you can remove the Absolute part of (Abs(Battle Zone 1 Unit Count)) == 1

    Posted in: Miscellaneous Development
  • 0

    posted a message on Random Encounters.

    I can take another quick look, I was going to mention this before but I believed you fixed it.

    The issue is the conditions, take a close look at them.

    You originally had, IF:

    OWNER OF TRIGGERING UNIT NOT PLAYER 15.
    OWNER OF TRIGGERING UNIT NOT PLAYER 0.

    The triggering unit is the unit that died.

    The unit that died is a zergling owned by player 15.

    Remove all those conditions or modify them.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Assign newly created units an ability order?

    @Nothing5:

            Unit - Create 1 BanelingMissle for player 5 at ((Position of Hero) offset by 1.0 towards (Facing of Hero) degrees) facing (Facing of Hero) degrees (No Options)
            Unit - Order (Last created unit) to ( Move targeting ((Position of Hero) offset by 60.0 towards (Facing of (Last created unit)) degrees)) (Replace Existing Orders)

              Unit - Order (Last created unit) to (Baneling - Explode) (Replace Existing Orders)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Assign newly created units an ability order?

    I have personally done this on my map for my psuedo-baneling-missle and appears to work.

    Perhaps there's an issue with the ability you are ordering on the unit.

    The unit has to have the ability to do this ability in the data editor, I don't believe it needs to be in the command card though.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Tutorial Request

    I would like to see a tutorial about lighting...

    Everything from changing a maps time of a day happy light to night day.

    Including how to properly change a units lighting aura that follows them so they don't have a flashlight at night.

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