Announcement

Collapse
No announcement yet.

GFxMoviePlayer GetPC() ?

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

    GFxMoviePlayer GetPC() ?

    hello there

    i didnt know if i should post this here or in programming
    i had a lot of great help today from programming so i thaught id give them a rest

    in GFxMoviePlayer ther is this function GetPC()
    it returns The PlayerController owning the movie

    i have my own playercontroller and want to access its variables

    i have

    local PlayerController PC;
    PC = GetPC();

    if i change it to local MyPlayerController PC;
    it says
    error type mismatch in =

    any ideas how to make it work?
    should i use a different method of getting MyPlayerController?

    thanks

    #2
    You need to cast the result of the GetPC() function to your type and then check to make sure the cast was successful:
    Code:
    local MyPlayerController PC;
    
    ...
    
    PC = MyPlayerController(GetPC());
    if(PC != None)
    {
    
    ...Do stuff here...
    
    }

    Comment


      #3
      ah this is the line i needed

      PC = MyPlayerController(GetPC());

      thanks jeffwilson

      Comment

      Working...
      X