Results 1 to 7 of 7

Thread: scaleOverTime problem

  1. #1
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts

    scaleOverTime problem

    Hello I just wanted to make fuel qauge for my rocket, using progressbar and scaleOverTime. I wanted to move it by vertical (from top to bottom). This is my code which doesn't work correctly:
    PHP Code:

            player
    .hud_progressbackground newClientHudElem(player);
        
    player.hud_progressbackground.420;
        
    player.hud_progressbackground.350;
        
    player.hud_progressbackground.alignX "left";
        
    player.hud_progressbackground.alignY "bottom";
        
    player.hud_progressbackground.horzAlign "fullscreen";
        
    player.hud_progressbackground.vertAlign "fullscreen";
        
    player.hud_progressbackground.alpha 0.5;
        
    player.hud_progressbackground.sort 1;
        
    player.hud_progressbackground setShader("gfx/hud/hud@health_bar.tga"12 196);
        
        
    player.hud_progressbar newClientHudElem(player);
        
    player.hud_progressbar.422;
        
    player.hud_progressbar.348;
        
    player.hud_progressbar.alignX "left";
        
    player.hud_progressbar.alignY "bottom";
        
    player.hud_progressbar.horzAlign "fullscreen";
        
    player.hud_progressbar.vertAlign "fullscreen";
        
    player.hud_progressbar setShader("gfx/hud/hud@health_bar.tga"8190);
        
    player.hud_progressbar.color = (0,255,0);
        
    player.hud_progressbar.alpha 0.5;
        
    player.hud_progressbar.sort 2;

            
    player.hud_progressbar scaleOverTime(1580); 
    Any tips please?
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

  2. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    "doesn't work correctly" is not a good info
    timescale 0.01

  3. #3
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    I didn't know how to explain. I'll show it on image (paint master)
    Attached Thumbnails Attached Thumbnails kt.png  
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

  4. #4
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    was trying to do the same months ago and have had similar issues with hud + relative alignment + scaling, seems to be a cod2 bug. couldnt find statisfiing solutions for it.
    Last edited by serthy; 27th October 2013 at 11:25.

  5. The Following User Says Thank You to serthy For This Useful Post:

    RobsoN (27th October 2013)

  6. #5
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Maybe u can fake the scaleovertime by adding manually the green progress

  7. #6
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by serthy View Post
    was trying to do the same months ago and have had similar issues with hud + relative alignment + scaling, seems to be a cod2 bug. couldnt find statisfiing solutions for it.
    Look at the sprint hud in COD2 eXtreme+ mod. They have a vertical scaleover that works flawlessly. If they can do, so can anyone else.

  8. #7
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    I made loop with y -= 1.3 per .1 second, and everything is good. Thanks for help.
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

  9. The Following User Says Thank You to RobsoN For This Useful Post:

    smect@ (9th August 2014)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •