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

Super a variable function

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

  • Super a variable function

    I'm trying to extend
    Code:
    function bool DriverEnter(Pawn P)
    In my vehicle code.

    So of course I have the super at the end to call UTVehicle's code like this
    Code:
    	Super.DriverEnter(Pawn P);
    But this gives me a bad or missing expression for token error.
    Having just P in the brackets will compile but the super doesn't work (my code executes but you don't enter the vehicle).

    What am I missing?

  • #2
    Note that your function must return a value. If you don't want to change the parent class implementation's return value, just use it as your function's return value.

    Remember: Super calls are just regular function calls, with parameters passed in and optionally a value returned.

    Comment


    • #3
      The call should instead be this:

      Code:
      return Super.DriverEnter(P);

      Comment


      • #4
        Giving fish and teaching how to fish...

        Comment


        • #5
          Something like that

          Comment


          • #6
            I stopped being a pillock, went hunting instead and found:
            Code:
            if ( super.DriverEnter(P) )
            Which seems to be how Epic do it, though either works.

            Thanks for the help.

            Comment

            Working...
            X