Announcement

Collapse
No announcement yet.

Design approach; On mouse click

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

    Design approach; On mouse click

    Ok so before I design this next blueprint system I was hoping for some advice on how I should approach it.

    What im wanting is , on mouse over of a static mesh blueprint that has been placed in the world, to be able to call that blueprints specific calls.

    When i Click on a cow i want it to mooo and play an anim and when i click on a chicken i want it to cockadoodle-doo and play an anim,

    cheers and thanks i love you guys!!
    DJ

    #2
    Hello,
    you have to do a parent blueprint where you set your generic detection / event. And then specify event in each child. Search tom looman's usable actor system.

    Comment


      #3
      Thanks alot

      Comment


        #4
        You have to first enable mouse over events/click events, which is found under Player controller. You cannot access the default base Playcontroller. If your game do not have a custom PlayerController, you will need to create one. To create a custom PlayerController (Lets call it MyPlayerController) , add a blueprint (as per normal) then select PlayerController as the parent.
        After that, opening the default tab of MyPlayerController Blueprint, you can enable/disable the mouse events.

        Also, in order to use your custom MyPlayerController, you have to create a custom game mode. Again, if its not available. create one, using Blueprint, & pick game mode as parent.
        Then under game mode setting ( by double clicking the game Mode BP you have), or under world settings, select Your custom MyplayerController as PlayerController.

        Then you can call out beginMouseOver, EndMouseOver, On MouseClick (name is from my memory, I do not have UE4 opened) etc events, to make your cow moo and more.

        Note: Do note, that the default First person Cursor (which is always in middle of screen by defalult) is NOT the mouse cursor.
        Check my working title: The Locked Room here: https://forums.unrealengine.com/show...he-locked-Room

        Comment


          #5
          starseeker, thanks so much, its all coming together

          Comment

          Working...
          X