• 0

    posted a message on Large map, detail, and doodads. Need some lag tips.

    @JakeCake26: Go

    Thanks a lot for your tip. More tips would be highly appreciated! :)

    Posted in: Terrain
  • 0

    posted a message on Large map, detail, and doodads. Need some lag tips.

    There is a map I have been working on for a while. I've been slowly pecking away at the map giving every inch of it as much love and detail as I possibly can. I can't even remember when I actually started building this map as I have been working on it for quite a while.

    Anyway, as you could imagine working on a large map and giving it lots of details will add to that doodad count quite a bit. The in game lag is starting to get a bit noticeable. I'm starting to think maybe I will have to start looking for any doodads I can dispose of, but I'd rather that be a last resort so I am wondering if there are any good techniques to increase fps in big maps.

    Posted in: Terrain
  • 0

    posted a message on Need something created for you?

    @deathtorn: Go

    thanks

    Posted in: Triggers
  • 0

    posted a message on Need something created for you?

    @deathtorn: Go

    I mostly want to do this for detecting structures that would cause the hero unit to path around. Basically if a player moves into a structure I want them to come to a complete stop instead of pathing around.

    Posted in: Triggers
  • 0

    posted a message on Need something created for you?

    @deathtorn: Go

    Hmm, How about I show you exactly what I'm doing.

    Polar Offset Point Movement
        Events
        Local Variables
            Max Offset Distance = 0 <Integer>
        Conditions
        Actions
            General - While (Conditions) are true, do (Actions)
                Conditions
                    Max Offset Distance < 45
                    (Cliff level of (Position of Player 1 Hero)) == (Cliff level of Point B)
                Actions
                    Variable - Set Point B = (Point B offset by (+ (3.0)) towards (Facing of Player 1 Hero) degrees)
                    Variable - Set Max Offset Distance = (Max Offset Distance + 3)
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            Max Offset Distance == 45
                        Then
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    (Cliff level of (Position of Player 1 Hero)) == (Cliff level of Point B)
                                    ((Closest unit to Point B in (Any units in (Entire map) owned by player Any Player matching Required: Structure, with at most Any Amount)) is in (Region(Point B, 1.0))) == false
                                Then
                                    Unit - Order Player 1 Hero to ( Move targeting Point B) (Replace Existing Orders)
                                    UI - Display ("Moving To Max Distance of " + ((Text(Max Offset Distance)) + "!!!")) for (All players) to Subtitle area
                                    Ping - Ping the minimap at Point B for (All players) over 5.0 seconds, using the color (0%, 100%, 0%)
                                Else
                                    Variable - Set Point B = (Point B offset by (- (3.0)) towards (Facing of Player 1 Hero) degrees)
                                    General - Wait 0.1 Game Time seconds
                                    Unit - Order Player 1 Hero to ( Move targeting Point B) (Replace Existing Orders)
                                    UI - Display ("Moving To Max Distance of " + ((Text(Max Offset Distance)) + "!!!")) for (All players) to Subtitle area
                                    Ping - Ping the minimap at Point B for (All players) over 5.0 seconds, using the color (0%, 100%, 0%)
                        Else
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    Max Offset Distance < 45
                                Then
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            (Cliff level of (Position of Player 1 Hero)) != (Cliff level of Point B)
                                        Then
                                            Variable - Set Point B = (Point B offset by (- (3.0)) towards (Facing of Player 1 Hero) degrees)
                                            General - Wait 0.1 Game Time seconds
                                            Unit - Order Player 1 Hero to ( Move targeting Point B) (Replace Existing Orders)
                                            UI - Display ("Moving To Cliff Detected At " + ((Text(Max Offset Distance)) + "Distance!!!")) for (All players) to Subtitle area
                                            Ping - Ping the minimap at Point B for (All players) over 5.0 seconds, using the color (100%, 0%, 0%)
                                        Else
                                Else
    

    It's a movement trigger for a wasd movement system I'm working on. The idea is to use a point to check various positions in front of the hero unit and move it straight forward. If a cliff is detected the unit will only move up to the cliff other wise it would move straight to a max of 45 distance.

    The reason I wanted to move the unit forward in this way it simply to limit trigger use which is a huge problem with other wasd movement people have created. I came up with the idea to try to move the unit up to the furthest position it could move until its path was redirected.

    The first step of this was to detect cliffs and I actually have this part down. In fact its very solid, but now I want to implement detecting units which seems a bit more complicated.

    Posted in: Triggers
  • 0

    posted a message on Need something created for you?

    I have this trigger I'm working on that dynamically sets the value of a point variable using a While Loop. I want to check for units around the point every time the point variable's value changes. I also want to store the first unit found into a unit variable.

    Posted in: Triggers
  • 0

    posted a message on Want to check if a unit is a structure.

    I want to check if unit is a structure. How would I do this?

    Edit: Thanks, that worked.

    Posted in: Triggers
  • 0

    posted a message on Block unit movement, but not building placement?

    @LazyCoder: Go

    When you say building placement are you talking about in the editor or players building in game?

    Posted in: Data
  • 0

    posted a message on Two questions related to Points/Coordinates.

    @Usernameisntworkingright: Go

    Variable - Set Point B = ((Position of Player 1 Hero) offset by 50.0 towards (Facing of Player 1 Hero) degrees)

    So I need to make that?(Can't test atm)

    Edit: It works perfectly!!!

    I'm going to try to implement this into a WASD movement system via triggers.

    The idea being that the trigger can check various distances in front of the unit then order them to move based on the distance to the nearest cliff, unit, doodad that blocks path, etc etc.

    This will prevent people from having to constantly run a trigger over and over again using a periodic event. I'm hoping that maybe this will result in significantly less lag using this type of movement via triggers.

    Anyway with that said this was the first step I felt I needed to take.

    Posted in: Triggers
  • 0

    posted a message on Set Worker Rally Point

    >.< lol, I tried to help at least. I'm not sure how to solve your prob either then :(

    Posted in: Triggers
  • 0

    posted a message on Best way to randomize an array of integers?

    @akaGrimm: Go

    Make a "set variable" action. Use the "random integer" function for each number and set between whatever amounts you want. I think that will work, but then again I am not very familiar with how arrays work.

    Edit: I think that might just randomize the index numbers lol. I'm not sure how to manipulate the values for each index, but I'm going to assume you might so after the = you would probably wanna find the option that lets you change array index values then use the random integer function there.

    Posted in: Triggers
  • 0

    posted a message on Set Worker Rally Point

    @Moooyaah: Go

    Can I see your trigger.

    Edit: Create a action and go to Move Point.

    Set the point to the function "Unit rally point target point"

    Now I took a look at the hatchery rally point ability in the data editor and apparently both rally points are from the same ability, but are labeled as rally 1, rally 2. I'm pretty sure rally 2 is the worker rally point.

    With that said I would set the point in the function to 2 and I'm not sure what the number for target is.

    Then of course you wanna set triggering unit to your hatchery unless triggering unit is your hatchery for the trigger. Of course set the position to whatever you want, but I'm guessing you want to set it to some mineral cluster so you would leave it as position of unit and change the unit to a mineral or whatever.

    Posted in: Triggers
  • 0

    posted a message on Two questions related to Points/Coordinates.

    Edit: I actually tested some stuff out and there seems to be a few issues. I created the action and condition I described.

    When a player presses a key the Point B variable is set via action from the above post. Right after the set variable action there is a "if, then, else" statement.

    If the player units cliff level is not equal to Point B it will tell me via text message and if it is equal then it will tell me that as well via text message.

    Here is the trigger.

        Events
            UI - Player Any Player presses Tab key Down with shift Allow, control Allow, alt Allow
        Local Variables
            Point B = No Point <Point>
        Conditions
        Actions
            Point - Move Point B To ((Position of Player 1 Hero) offset by 50.0 towards (Facing of Player 1 Hero) degrees)
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Cliff level of (Position of Player 1 Hero)) != (Cliff level of Point B)
                Then
                    UI - Display "Cliff Detected at 50." for (All players) to Subtitle area
                Else
                    UI - Display "Cliff Not Detected At 50." for (All players) to Subtitle area
    

    Player 1 Hero is actually a Global Variable if your wondering why its not set in this trigger.

    I get this error message in game.

    'PointSet' (value:0) Trigger Error in gt_Polaroffset_Func: Could not get 'point' from Parameter in 'PointPathingCliffLevel' (value:0)

    If anyone knows what this means then any info would be much appreciated.

    Posted in: Triggers
  • 0

    posted a message on Two questions related to Points/Coordinates.

    @Writhes: Go

    WOW, I can not freaking believe I solved the answer to my second question without knowing anything about what I was doing.

    This is the Action.

    Point - Move Point B To ((Position of Player 1 Hero) offset by 10.0 towards (Facing of Player 1 Hero) degrees)

    Point B is a point variable and Player 1 Hero is a unit variable which also represents Point A in my above post. Obviously the offset can be set to whatever the desired distance is between the unit and Point B.

    Anyway, apparently what I was looking for was called a Polar offset which is the distance from something at an angle.

    All I need to do now is figure out how to determine cliff levels at Point B.

    Posted in: Triggers
  • 0

    posted a message on Two questions related to Points/Coordinates.

    1. Is there a way via triggers I can check cliff levels at certain points? I would like to store cliff levels into a variable integer.

    2. I want to know if its possible to create coordinates at a distance from where a unit is facing. Imagine (Point A aka unit facing) is an arrow pointing a certain direction and at a certain distance is (Point B). How do I get the X and Y position for Point B assuming I know the distance between the two points?

    If your wondering if these two questions are related then the answer is yes. My goal is to check cliff height certain distances from where the unit is facing.

    Edit: Hmm, I guess the second question is sort of like trying to find the coordinates of the edge of a circle on a big grid at an angle from the center of the circle. The distance between Point A and Point B represent the radius of the circle.

    I'm assuming it has something to do with plugging in the position of the center of the circle, the size of each unit of the grid, the angle, and the circumference into some sort of equation.

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