Guest User

Untitled

a guest
Sep 26th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. state ScrambleTeleportState
  2. {
  3.  
  4.     function ParticleSystemComponent SpawnEmitterMeshAttachment( ParticleSystem EmitterTemplate, SkeletalMeshComponent Mesh, name AttachPointName, optional bool bAttachToSocket, optional vector RelativeLoc, optional rotator RelativeRot );
  5.  
  6.        
  7.    
  8.  
  9. Begin:
  10.         ScriptTrace(); /// LOGuje ci callstacka ze skryptow
  11.         `Log("bQueActive="$bQueActive);
  12.         `Log("bPauseIsActive="$bPauseIsActive);
  13.         Sleep(0.2f);
  14.         SpawnEmitterMeshAttachment(ProjTeleportTemplate, Pawn.Mesh, 'FullBodySlot', true);
  15.         `Log("bPauseIsActive="$ProjTeleportTemplate);
  16.         Sleep(0.2f);
  17.         if(bQueActive && !bPauseIsActive)
  18.         {
  19.             /// DZIALA JAK JEST PROSTO
  20.             Pawn.SetLocation( QueCommands[QueCommands.Length - 1].SavedQuePosition);
  21.         }
  22.         else
  23.         {
  24.             Pawn.SetLocation( MousePosition3d * vect(1,1,0) + Pawn.Location * vect(0,0,1));
  25.         }
  26.         `Log("[ Pawn Location AFTER teleport ] " $Pawn.Location);
  27.        
  28.         bScrambleInit = false;
  29.         Sleep(0.1f); //for debug
  30.         if(bQueActive)
  31.         {
  32.             QueCommands.Length = QueCommands.Length - 1;
  33.            
  34.             if( QueCommands.Length>0 )
  35.             {
  36.                 GotoState(QueCommands[QueCommands.Length - 1].Command);
  37.                
  38.             }
  39.             else
  40.             {
  41.                 ResetCommandQue();
  42.             }
  43.         }
  44.    
  45. }
Add Comment
Please, Sign In to add comment