Results 1 to 3 of 3

Thread: [CODUO] Vehicle turrets not playing camera bobbing

  1. #1
    Private keso's Avatar
    Join Date
    Oct 2016
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts

    [CODUO] Vehicle turrets not playing camera bobbing

    Hi

    I came across an issue the other day where vehicle turrets in united offensive only plays fire animation (not sure if anim, could also just be camera tweaks) after the turret is overheated. (See video below)

    https://youtu.be/d56SxnkHtXM

    Some sort of function needs to be called upon mounting the turret and I'm completely clueless.

    Here's the full script which handles jeep driving and the turret.

    http://pastebin.com/raw/1QKxf0Yf

    This is the only interesting code I can find in there and half of the functions I cant find any reference to..

    Code:
    Code below is called from "delayed_process_activate( vehpos, activator )" like so:
    
    	else if (vehpos == 2) //Vehicle position 2 is gunner
    	{
    		self.gunner = activator;
    		self thread player_shoot_gunner();
    	}
    
    
    hud_overheat_run(activator, overheat)
    {
    	self endon("death");
    	activator endon("death");
    	activator endon("stop_tank_hud");
    	
    	minheight = 0;
    	max_width = 126;
    	
    	while(1)
    	{
    		wait (0.1);
    		if ( !isAlive(self) || !isDefined(overheat) )
    			continue;
    		
    		if ( activator.vehpos == 1)
    		{
    			heat = self getaltheat();
    			overheating = self getaltoverheating();
    		}
    		else
    		{
    			heat = self getgunnerheat();
    			overheating = self getgunneroverheating();
    
    		}
    		
    		if ( overheating )
    		{
    			overheat.color = ( 1.0, 0.0, 0.0);
    		}
    		else
    		{
    			overheat.color = ( 1.0, 1.0-heat,1.0-heat);
    		}
    	
    		hud_width = (1.0 - heat) * max_width;
    		
    		if ( hud_width < 1 )
    			hud_width = 1;
    			
    		overheat setShader(level.tank_hud_bar, hud_width, 5);
    	}
    }
    
    player_shoot_gunner()
    {
    	self notify("kill_existing_player_shoot_gunner");
    	self endon("kill_existing_player_shoot_gunner");
    	while(self.health > 0)
    	{
    		self waittill( "turret_gunner_fire" );
    		self fire_gunner();
    	}
    }
    
    fire_gunner()
    {
    	if(self.health <= 0)
    		return;
    
    	if(level.ceasefire == 2)
    		return;
    
    	// fire the turret
    	self FireGunner();
    }
    Also tried adding fire/idle anim to weapon file "50cal_tank_mp" (Which is the turret used for "willyjeep_mp") with no luck.

    Same issue with all vehicle turrets.

    Any ideas?

    Thanks //Keso

  2. #2
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    This looks like the anim at first plays only the same 2 viewkicks over and over again, and after overheating it plays random viewkicks (as its supposed to be).
    I did a quick scan over your script, but couldn't find anything that might cause this (also im not familar with cod:uo).

    Where did you get this script from (original cod:uo script or did you put it together yourself)?
    Does it work when you disable/comment-out the overheat functionality at all?
    Maybe it is an issue with conflicting notify/waittills? (just a wild guess)

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

    keso (2nd January 2017)

  4. #3
    Private keso's Avatar
    Join Date
    Oct 2016
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by serthy View Post
    This looks like the anim at first plays only the same 2 viewkicks over and over again, and after overheating it plays random viewkicks (as its supposed to be).
    I did a quick scan over your script, but couldn't find anything that might cause this (also im not familar with cod:uo).

    Where did you get this script from (original cod:uo script or did you put it together yourself)?
    Does it work when you disable/comment-out the overheat functionality at all?
    Maybe it is an issue with conflicting notify/waittills? (just a wild guess)
    this is an official UO script. Yes everything works when removing anything regarding heat.

Posting Permissions

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