Announcement

Collapse
No announcement yet.

Using both c++ and blueprint

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

    Using both c++ and blueprint

    Im using the FPS script that came with UE4 and it came with the custom hud and crosshair which works fine..the problem that i am having is that i cant get it to use my blueprint functions. For testing i tried printing a string to the screen but doesnt work. I used the Hud.h and MyCustomHUD.h as the parent but either didnt work...what im i doing wrong? Am i suppose to grab it with the c++ code ? If so how do i do that with the HUD class?

    #2
    Originally posted by skeeta92 View Post
    Im using the FPS script that came with UE4 and it came with the custom hud and crosshair which works fine..the problem that i am having is that i cant get it to use my blueprint functions. For testing i tried printing a string to the screen but doesnt work. I used the Hud.h and MyCustomHUD.h as the parent but either didnt work...what im i doing wrong? Am i suppose to grab it with the c++ code ? If so how do i do that with the HUD class?
    Anybody know a easy way to do a timer using blueprint or c++ ?

    Comment


      #3
      You still need an entry point in Blueprints. Usually a good entry point is an event which is called by C++ such as Begin Play. In the cast for the HUD, you probably want to use the Post Render event. In terms of using timers in blueprints, the functions set, get and clear a timer are available.

      Comment


        #4
        In C++, you might want to have a look at GetWorldTimerManager().SetTimer(...), GetWorldTimerManager().ClearTimer(...) and "friends".
        Last edited by GreenEyed; 04-08-2014, 11:38 AM.

        Comment


          #5
          could you post the blueprint you made?

          Comment


            #6
            Originally posted by skeeta92 View Post
            Im using the FPS script that came with UE4 and it came with the custom hud and crosshair which works fine..the problem that i am having is that i cant get it to use my blueprint functions. For testing i tried printing a string to the screen but doesnt work. I used the Hud.h and MyCustomHUD.h as the parent but either didnt work...what im i doing wrong? Am i suppose to grab it with the c++ code ? If so how do i do that with the HUD class?
            Did you change your project settings so that they use the new blueprint class instead of the normal Hud/CustomHud?
            There already are a bunch of blueprinted events which will be triggered for all blueprints which are Actors.

            Comment

            Working...
            X