Page 5 of 17 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 166

Thread: True First Person Demo 2012-04-18

  1. #41
    cyberbemon
    Guest
    Quote Originally Posted by alvarofer0021 View Post
    tfpPawn check the StopAltFire function and ToggleIronSights
    I checked tfpawn and couldn't find any funcitons like that ! . however i came acroos this "AdjustToWeaponSight" but still didn't find the "StopAltFire", also one more question @slowJusko i saw another tutorial done by you where u added eye sockets and all that ! do i have to do that in order for this ADS to work ?

  2. #42
    alvarofer0021
    Guest
    Sorry my bad its StopFire() There you can check ToggleAim() and for the ADS to work you only need an socket called SightSocket in your weapon also for the true fps view to work you need the eyes socket too

  3. #43
    Confusion
    Guest
    nice pack

    how to remove from the script that way: they are near an object leaves the gun down and can not shoot ..

  4. #44
    cyberbemon
    Guest
    Quote Originally Posted by alvarofer0021 View Post
    Sorry my bad its StopFire() There you can check ToggleAim() and for the ADS to work you only need an socket called SightSocket in your weapon also for the true fps view to work you need the eyes socket too
    ohk so here is what i did.. i opened UDK and added a new socket for the link gun and named it "GunAimAdjustNode" and below is the code in my pawn class.. when I compile , I get an error message " Error, Bad or missing Expression in if "

    Code:
    class AwesomePawn extends UTPawn;
    
    var bool bWeaponAiming;
    var float fDelayStartFire;
    var bool bWantsToFire;
    var float fChangeAimTime;
    var SkelControlSingleBone GunAimAdjustNode;
    
    simulated function StopFire(byte FireModeNum)
    {
    	if (FireModeNum != 1)
    		bWantsToFire = false;
    
    	if (fDelayStartFire > WorldInfo.TimeSeconds)
    		return;
    
    	// toggle aim on release, if we weren't holding it down (which is something else again)
    	if ((Weapon != None) && (FireModeNum == 1) && !bNoWeaponFiring)
    	{
    		 //if we're a client, synchronize server
    		if (Role < Role_Authority)
    			ServerToggleAim();
    		ToggleAim();
    		return;
    	}
    	
    	Super.StopFire(FireModeNum);
    }
    reliable server function ServerToggleAim()
    {
    	ToggleAim();
    }
    simulated function ToggleAim()
    {
    	if (GunAimAdjustNode == None)
    		return;
    
    	if (bIsSprinting)
    	{
    		if (bWeaponAiming)
    			fChangeAimTime = WorldInfo.TimeSeconds + TimeToChangeAim;
    		bWeaponAiming = false;
    	}
    	else
    	{
    		fChangeAimTime = WorldInfo.TimeSeconds + TimeToChangeAim;
    		bWeaponAiming = !bWeaponAiming;
    	}
    	
    	//bIsWalking = bWeaponAiming;
    	GunAimAdjustNode.BoneTranslation = tfpWeapon(Weapon).aimOffset;
    
    	// aiming, blend in...
    	if (bWeaponAiming)
    	{
    		//GunAimAdjustNode.SetSkelControlActive(true);
    		GunAimAdjustNode.SetSkelControlStrength(1.0f, TimeToChangeAim);
    		HeadAimAdjustNode.SetSkelControlStrength(1.0f, TimeToChangeAim);
    	}
    	// not aiming, blend out...
    	else
    	{
    		GunAimAdjustNode.SetSkelControlStrength(0.0f, TimeToChangeAim);
    		HeadAimAdjustNode.SetSkelControlStrength(0.0f, TimeToChangeAim);
    	
    	}
    }
    
    
    
    DefaultProperties
    {
    }

  5. #45
    alvarofer0021
    Guest
    You are not supposed to add a new socket what i meant is OPEN your skeletal mesh weapon in the UDK Editor and CREATE the socket there

    if you really wanna change the name of the socket that is used in the code(so your weapon socket name can be diferent) find every reference to the SightSocket and rename it to your own

  6. #46
    cyberbemon
    Guest
    Quote Originally Posted by alvarofer0021 View Post
    You are not supposed to add a new socket what i meant is OPEN your skeletal mesh weapon in the UDK Editor and CREATE the socket there
    That is exactly what I did , I opened the skeletal mesh and added a new socket. When asked for a name , I named it "GunAimAdjustNode".



    I found a variable
    Code:
    var SkelControlSingleBone GunAimAdjustNode;;
    in the original code and so i decided to give that name to the socket. i didn't change anything at all , there is also a second variable named
    Code:
    var SkelControlSingleBone HeadAimAdjustNode;
    I'm not sure which one is supposed to be the socket name. I just copy pasted the two functions and the variables from the original code... and changed this line
    Code:
    GunAimAdjustNode.BoneTranslation = tfpWeapon(Weapon).aimOffset;
    to
    Code:
    GunAimAdjustNode.BoneTranslation = UTWeapon(Weapon).aimOffset;
    .

  7. #47
    alvarofer0021
    Guest
    ....GunAimAdjustNode is a NODE For animtrees why are you even using that


    You just need to create a new socket NAMED SIGHTSOCKET and thats it and if your using this you shouldnt change the script reference from tfpWeapon to UTWeapon since TFPWeapon its exactly the same as UTWeapon except it only has the checks and functions for attachments/third person version of the weapon

  8. #48
    cyberbemon
    Guest
    Quote Originally Posted by alvarofer0021 View Post
    ....GunAimAdjustNode is a NODE For animtrees why are you even using that
    You just need to create a new socket NAMED SIGHTSOCKET
    oh god this is embarrassing .. but isn't that how u add sockets ? (using the socket manager) .. or is there another way ?

    sorry , but i'm still learning

  9. #49
    alvarofer0021
    Guest
    yes you do use the SocketManager for creating sockets but im telling you that the GunAimAdjustedNode is not the socket name you need to use its a node that its used in the character animtree

    Now you only need a socket Named SightSocket and thats all that you need for the iron sight to work

  10. #50
    Ray Jones 312
    Guest
    How would one get hitzones to work? I noticed headshots no longer work with this.

Tags for this Thread

Posting Permissions

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