Announcement

Collapse
No announcement yet.

Slowing Players Down

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Do I put this piece of code into the UTPawn file and then add the functions in the UTWeap_LinkGun file or am I way off with that?

    Leave a comment:


  • replied
    Thanks alot man I'll see about setting this up.

    Leave a comment:


  • replied
    You just add something like this
    Code:
    function SetSlowEffect(float Duration, float Speed)
    {
    	if(Speed < currentCustomTimeDilation)
    	{
    		CustomTimeDilation = Speed;
    		// or you can just set the GroundSpeed and not bother with CustomTimeDilation
    		currentCustomTimeDilation = Speed;
    	        bSpeedFXChanged = true;
            	if(IsTimerActive('Timer_RestoreSpeedEffect'))
                        ClearTimer('Timer_RestoreSpeedEffect');
    
                    SetTimer(Duration,false,'Timer_RestoreSpeedEffect');
    	}
    }
    
    function Timer_RestoreSpeedEffect()
    {
    	CustomTimeDilation = 1.0;
    	currentCustomTimeDilation = 1.0;
    	bSpeedFXChanged = false;
    }
    in the pawn's file,
    then call it when you do damage with the link gun

    Leave a comment:


  • started a topic Slowing Players Down

    Slowing Players Down

    I have a mechanic I would like to use within the UDK I'm still getting to grips with all of it's features and I'm not all that great with coding if thats even whats required here. I would like to set the linkgun up so that when I use the alternate fire it slows the player or bot being fired at down, I would've used the search feature for a similar thread but I wasn't completely sure how to word it correctly and thought it would be quicker to just explain it here.

    Anyways I assume this is possible and would just like to be pointed in the right direction if at all possible, Thanks for any help guys!

    Mug
Working...
X