Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

[Solved] Quick question Trace and Level

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

  • [Solved] Quick question Trace and Level

    I'm doing a short trace to check if my pawn can perform a wall jump.

    Code:
    function bool DoWallJump( bool bUpdating )
    {
    	local Vector HitLocation, HitNormal, End, Start;
    	local Actor HitActor;
    	Start = Location + (Vector(Rotation) * GetCollisionRadius());
    	End = Start + (Vector(Rotation) * 50);
    	HitActor = Trace(HitLocation, HitNormal, End, Start, false,);
    	/*if (HitActor == Level)
    	{
    		`Log("Imma WallJumpin");
    	}*/
    	//`Log(HitActor);
    }
    But the compiler don't accept "Level" in the if, but the Trace function says it can return "Level"...

    D:

    Edit: And the code is probably wrong too, cos this:

    Code:
    	local Vector HitLocation, HitNormal, End, Start;
    	local Actor HitActor;
    	Start = Location + (Vector(Rotation) * GetCollisionRadius());
    	End = Start + Vector(Rotation) * 50;
    	HitActor = Trace(HitLocation, HitNormal, End, Start, false,);
    	`Log(HitActor);
    Give me a warning, see the attachments.
    Attached Files

  • #2
    Level?
    maybe you want to use WorldInfo instead?

    Comment


    • #3
      Originally posted by Demestotenes View Post
      Level?
      maybe you want to use WorldInfo instead?
      Dunno, now I need the function to not crash :2

      Comment


      • #4
        Your error means that your function is declared to return a bool, but it's not returning anything.

        In UE3, it's WorldInfo not LevelInfo.

        Comment


        • #5
          Originally posted by Blade[UG] View Post
          Your error means that your function is declared to return a bool, but it's not returning anything.

          In UE3, it's WorldInfo not LevelInfo.
          Oh damn, Thanks for the answer.

          I can't get used to "function bool MyFunc()" instead of "bool function MyFunc()"
          I keep missing the return.

          Thanks again!

          Comment

          Working...
          X