• 0

    posted a message on [Solved!] Height Changing w/Time
    Quote from grenegg: Go

    Unless your not having it be lineir, you know exactly how high it is based of of how long its been sense you told it to rise.

    Yes, every 7 seconds it goes between 3 & 7. What I meant when I said that was there is no "lava height" variable or "check lava height at region" trigger or w/e...

    I'm trying to use a timer variable because it tracks the game time, which is what tracks the lava height.. I'm working around the 'no direct route' problem, but it's not working...

    Posted in: Triggers
  • 0

    posted a message on [Solved!] Height Changing w/Time

    @BasharTeg: Go

    lol... you just described what I'm already trying to do...

    I know trig. I am not trying to make the unit bob up and down forever. I want to set the unit height (one time) to the same height as the lava. It is impossible to check the lava's height directly since I'm using a change in water state trigger for that.

    Cosine, by definition has a range of y values between -1 and 1. Cosine(0) = 1
    http://www.wolframalpha.com/input/?i=%284.0+%2B+%284.0+*+%28Abs%28%28Cos%28%28%28x%29+%2F+%286.2832+%2F+7.0%29%29%29%29%29%29%29%29
    is exactly what my function looks like. Check out tha graph.

    My function is flawless except for the elapsed timer thing... I think I should change the title of this topic to "Timer help" because there is obviously something I am missing when it comes to timers ):

    Posted in: Triggers
  • 0

    posted a message on camera help?
    Quote from Reaper872: Go

    I am trying to trigger a series of cameras that go in a circle around my map in a loop. Well not a loop exactly, but they will always go to the next one in the series over and over and over again. What is the best way to get a decent looking version of this? Do I need a camera placed every so often around in a giant circle? Can I just place 1 camera and tell it to circle around? Please help.

    technically you could just create 1 camera and give it the trigger "follow unit" and have it follow an invisible unit that flies around your map...

    but I'd say make 1 camera & give a trigger saying something to the effect:

    create region a at point (top of circle)
    pan camera to region a

    create region a at point (next point in circle)
    pan camera to region b

    ... etc.

    So the camera makes an entire loop.. like so:
    http://img6.imageshack.us/img6/9190/1111ff.png

    Then you only need 1 camera and no preplaced regions or units.





    edit: Hmm, now i feel dumb... i cant find the create region or set region action but i know there is something similar... i guess you could also preplace 1 region and move that region to points along your circle.

    Hmm or use the equation of a circle (x-a)² + (y-b)² = r² to move your camera around. x & y would be the value of a timer or something.. something that keeps changing.. a & b are the coordinates (a,b) for the center of your map & r would be the radius (distance from the middle of your map to one edge).. This way would b a lot smoother looking 4 sure

    Posted in: Triggers
  • 0

    posted a message on Camera Bug

    @Skoite: Go

    try lowering the camera a bit. I think it's caused my the ceiling height inside the corridoor.

    Posted in: Triggers
  • 0

    posted a message on [Solved!] Height Changing w/Time

    @grenegg, i use 4+4*Abs(cos(Elapsed time of timer/2pi/7)) because.. Abs keeps the function always positive, cos makes the function a wave so it goes up and down with time instead of just increasing forever, and elapsed/2pi/7 is just a conversion to scale the function to the lava flow time scale...

    @Bash, I can't increment the units height over time because the movement must be instant. The lava does damage over time, but as soon as lava is going to give the killing shot, I want to move the unit just above the lava's surface (which goes from 3 to 7 over 7 seconds, forever) so the unit's death can be visible.



    Imagine my height function is just cos(x) & x=elapsed time of Timer.. This SHOULD go from 1 to -1 back and forth... but I'm getting 1 all the time.. Why is my Timer variable giving me 0 always even though I know it's running?

    Posted in: Triggers
  • 0

    posted a message on [Solved!] Height Changing w/Time

    Bump, also updated 1st post a bit..

    I'm not sure why the "Elapsed time of Timer" is returning 0 and causing my function to always spit out 8.

    Explanation/help please



    edit: i meant elapsed time, not duration... the duration is set to infinite

    Posted in: Triggers
  • 0

    posted a message on [Solved!] Height Changing w/Time

    Mmk.. I have a few lava pits on my map & the lava rises and falls with time. If a unit walks into the lava, they die. I want to show their death by moving the unit to a height just above the lava's surface.

    Basically I want to move a unit (before death) to a height between 4 & 8 depending on lava surface height (ie. game time).

    The trigger below pushes all the units to a height of 8, never anything else, and I cannot figure out where I went wrong.


    ========v==============The important part==============v==============
    Unit - Change (Triggering unit) height to (4.0 + (4.0 * (Abs((Cos(((Elapsed time of Timer) / (6.2832 / 7.0)))))))) over 0.0 seconds
    








    ========v==============Full code==============v==============

    Oh & the timer is just there to test that the timer wasn't 0 (my initial thought)

    ShowDeath
        Events
            Unit - Any Unit takes Fatal or Non-Fatal Any damage (from Any effects)
        Local Variables
        Conditions
            ((Triggering unit) has LavaBurn) == true
            ((Triggering unit) is in Lava) == true
            (Ground height at (Position of (Triggering unit))) < 7.0
            ((Triggering unit) uses Fly mover) == false
            ((Triggering unit) uses FlyLow (Unnamed) mover) == false
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Triggering damage amount) <= 3.0
                    ((Triggering unit) behavior 1) == LavaBurn
                    ((Triggering unit) Vitality (Current)) < 457.0
                Then
                    Unit - Change (Triggering unit) height to (4.0 + (4.0 * (Abs((Cos(((Elapsed time of Timer) / (6.2832 / 7.0)))))))) over 0.0 seconds
                Else
    
    Posted in: Triggers
  • 0

    posted a message on [Help] Leaderboard: Update when player quits

    @b0ne123: Go

    oo, you are right... glad they fixed it :)

    Posted in: Triggers
  • 0

    posted a message on [Help] Leaderboard: Update when player quits

    Nope, my idea fizzled & popped... I tried an old SC trick where you pre-place 1 unused building for each player then detect later if they own the building because if they quit ownership goes to player 0 or 15, i forget which... didn't work tho =\

    QUIT
        Events
            Unit - Any Unit owner changes
        Local Variables
        Conditions
            Or
                Conditions
                    (Owner of Abandoned Structure [4.82, 194.86]) == 0
                    (Owner of Abandoned Structure [4.82, 194.86]) == 0
                    (Owner of Abandoned Structure [4.82, 194.86]) == 0
                    (Owner of Abandoned Structure [4.82, 194.86]) == 0
                    (Owner of Abandoned Structure [4.82, 194.86]) == 0
                    (Owner of Abandoned Structure [4.82, 194.86]) == 0
                    (Owner of Abandoned Structure [4.82, 194.86]) == 0
                    (Owner of Abandoned Structure [4.82, 194.86]) == 0
        Actions
            General - Pick each integer from 1 to 8, and do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Old unit owner) == (Picked integer)
                        Then
                            Variable - Set PlayerHere[(Picked integer)] = false
                            Unit - Kill (Unit ((Unit type from "Unit") count for player (Picked integer), counting Queued Or Better) from (Any units in (Entire map) owned by player (Picked integer) matching Excluded: Missile, Dead, Hidden, with at most Any Amount))
                        Else
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    PlayerHere[(Picked integer)] == false
                Then
                    Leaderboard - Set KillBoard item text at column 1 and row (Picked integer) to "QUIT!!!"
                    Game - End game in Defeat for player (Picked integer) (Show dialogs, Show score screen)
                Else
    
    Posted in: Triggers
  • 0

    posted a message on [Help] Leaderboard: Update when player quits

    thats the same as the player status thing... only detects defeat, victory, or tie...

    I need a consistently firing trigger that will check every so often if a player is in game or not, but since there is no.....
    WAIT, i think i got it... Will report back with what im thinking when i get a chance to test this theory of mine.

    Posted in: Triggers
  • 0

    posted a message on [Help] Leaderboard: Update when player quits

    @DeProgrammer: Go

    that player status thing is what i meant... that cant be used for players leaving or dc'ing.... jus tred again... no luck

    Posted in: Triggers
  • 0

    posted a message on [Help] Leaderboard: Update when player quits

    Need a way to change the status of the leaderboard for a player that quits in the middle of the game, disconnects, or is defeated to 'XXXX.'

    Ie.

    P 1 -- 0
    P 2 -
    - 0
    P 3 -
    - 0
    P 4 -
    - 0

    P2 leaves

    P 1 -- 0
    Left -
    - 0
    P 3 -
    - 0
    P 4 -
    - 0

    Cannot use 'player is alive' as that only checks for when a player is victorious or defeated.

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