Announcement

Collapse
No announcement yet.

Teglegs Tutorials, Code and Stuff

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

  • replied
    little bump for anyone fairly new to udk

    Leave a comment:


  • replied
    This is a Goldmine

    Leave a comment:


  • replied
    no probs Uzair, glad it helped

    @StuntThumper, try increasing GroundSpeed and AirSpeed
    AirSpeed is air friction, not flying speed

    Leave a comment:


  • replied
    i just downloaded you car for udk mobile.. currently reading the code to understand and use it .. thanks alot tegleg. great help.

    Leave a comment:


  • replied
    Also note for vehicle top speed if u copied and pasted the scorpion code. Somewhere in all the booster codes in the scorpion, there's a speed restriction or something. I commented out everything involving the boost and my vehicle will go as fast as I want it to now . Ill go back and figure out what part of code it is later.

    Leave a comment:


  • replied
    little bump
    a few more things have been added

    Leave a comment:


  • replied
    Thanks, man. Your contributions to this community are well appreciated

    Leave a comment:


  • replied
    Thanks, tegleg. Studying your work has helped me a lot. Thanks for sharing.

    Leave a comment:


  • replied
    Spawning a vehicle instead of a player


    HI.

    Am a grad student new to Uscript.
    Am trying to spawn a vehicle instead of player.

    But am not able to achieve with the code what i have written.
    Please help me if i have gone wrong somewhere.

    This is my GameInfo class

    Code:
    class mygameinfo extends UTGame;
    var String VechileClass;
    var Vehicle yourvehicle;
    var PlayerController P;
    var vector alteredlocation;
    
    function RestartPlayer( Controller aPlayer)
    {
    	super.RestartPlayer(aPlayer);
    	
    	startspawning();
    }
    
    exec function startspawning()
    {
    	local PlayerController pc;
    	`log("Spawn Players in Vehicles");
    	pc.GotoState('PlayerVehicleState');
    }
    
    state PlayerVehicleState
    {
    Begin:
    spawnplayersinvehicle();
    }
    
    exec function spawnplayersinvehicle()
    {
    	foreach worldInfo.AllControllers(class'PlayerController',P)
    	{
    		alteredlocation = P.Pawn.Location;
    		alteredlocation += vect(100, 100, 100);
    		SetCollision(false, false);
    		yourvehicle = Spawn(class 'UTGameContent.UTVehicle_Scorpion_Content',,, alteredlocation, P.Pawn.Rotation);
    		SetCollision(false, false);
    		yourvehicle.AttachDriver(P.Pawn);
    	}
    }
    
    simulated event PostBeginPlay()
    {
    	`log("Player restart");
    	super.PostBeginPlay();
    }
    
    DefaultProperties
    {
    	DefaultPawnClass = class'blur.mypawn'
    	PlayerControllerClass = class'blur.mycontroller'
    }
    This is my pawn class

    Code:
    class mypawn extends GamePawn;
    
    simulated function PostBeginPlay()
    {
    	super.PostBeginPlay();
    	`log("Custom Pawn UP");
    
    }
    
    
    DefaultProperties
    {
    }
    Controller Class

    Code:
    class mycontroller extends PlayerController;
    
    simulated function PostBeginPlay()
    {
    	super.PostBeginPlay();
    	`log("Player Controller Initialized");
    }
    //state PlayerDriving
    //{
    //Ignores SeePlayer, HearNoise, Bump;
    //	function ProcessMove(float DeltaTime, vector NewAccel, eDoubleClickDir DoubleClickMove, rotator DeltaRot);
    	
    //	function ProcessDrive(float InForward, float InStrafe, float InUp, bool InJump)
    //	{
    //		local myvechile CurrentVechile;
    //		CurrentVechile=myvechile(pawn);
    //		if(CurrentVechile != none)
    //		{
    //			bpressedJump = InJump;
    //			CurrentVechile.SetInputs(InForward, -InStrafe, InUp);
    //			CheckJumpOrDuck();
    //		}
    //	}
    //	function PlayerMove(float DeltaTime)
    //	{
    //		UpdateRotation(DeltaTime);
    //		ProcessDrive(PlayerInput.RawJoyUp, PlayerInput.RawJoyRight, PlayerInput.aUp, bPressedJump);
    //		if(Role < ROLE_Authority)
    //		{
    //			ServerDrive(PlayerInput.RawJoyUp, PlayerInput.RawJoyRight, PlayerInput.aUp, bPressedJump, ((Rotation.Yaw & 65535) << 16) + (Rotation.Pitch & 65535));
    //		}
    //		bPressedJump = false;
    //	}
    //	event BeginState(Name PreviousStateName)
    //	{
    //		cleanOutSavedMoves();
    //	}
    //	event EndState(Name NextStateName)
    //	{
    //		CleanOutSavedMoves();
    //	}
    
    //}
    
    
    DefaultProperties
    {
    	//PawnClass=Class'blurring.mypawn'
    }

    Leave a comment:


  • replied
    thank you tegleg! very helpful!

    Leave a comment:


  • replied
    Awesome. Subbed to the thread. Can't wait to start going through some of it.


    Sent from my iPhone using Tapatalk

    Leave a comment:


  • replied
    cheeky bump*

    just added a few new things

    Leave a comment:


  • replied
    what do you mean it doesnt work?
    works fine for me, maybe something in your pawn not right?

    Leave a comment:


  • replied
    Random Movement AI don't work on muntiplayer online

    Leave a comment:


  • replied
    this is all great stuff man thanks!

    Leave a comment:

Working...
X