Announcement

Collapse
No announcement yet.

Cast to a Blueprint Actor

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

  • replied
    Originally posted by CreativeVilla View Post
    In your first person character create a variable. Change the Variable type to the NAME of your BP Class Actor in the scene (Variable Name drop down).

    Create a Function inside of your BP Class Actor ... call it "testfunction" or whatever and compile

    Inside your FPC again, Right click and type in the name of that function.

    The target input of that new function is your Variable you created above.
    The Character is Self.

    Try that.

    Jerry
    That i tryed before i post this here not work only all actors of class work
    Last edited by JUDGE DREDD VR; 07-11-2017, 04:32 PM.

    Leave a comment:


  • replied
    Originally posted by SKYNET2K View Post
    Hello i have a Blueprint Actor and in this a Function

    i want to call this function from my Character but not work, only with get all actors of class work but not with cast to what i make false?

    what i need add as object in cast to? i try self

    and i try a variable with reference to the Blueprint.
    In your first person character create a variable. Change the Variable type to the NAME of your BP Class Actor in the scene (Variable Name drop down).

    Create a Function inside of your BP Class Actor ... call it "testfunction" or whatever and compile

    Inside your FPC again, Right click and type in the name of that function.

    The target input of that new function is your Variable you created above.
    The Character is Self.

    Try that.

    Jerry

    Leave a comment:


  • replied
    Originally posted by SKYNET2K View Post
    how you mean that

    make a variable with reference to my blueprint in my instance?

    Edit: dont work

    I cast to my game instance in my character and fire to a custom event in my instance

    in my instance have a variable with reference to my blueprint

    the custom event fire to my blueprint function
    If you post a screenshot people can better assist you. Otherwise we can just point you to tutorials and general documentation.

    Leave a comment:


  • replied
    This page might help you:
    https://docs.unrealengine.com/latest...ts/Blueprints/

    Epic had a video on it but I can't find it sorry

    Leave a comment:


  • replied
    how you mean that

    make a variable with reference to my blueprint in my instance?

    Edit: dont work

    I cast to my game instance in my character and fire to a custom event in my instance

    in my instance have a variable with reference to my blueprint

    the custom event fire to my blueprint function
    Last edited by JUDGE DREDD VR; 07-09-2017, 02:50 PM.

    Leave a comment:


  • replied
    Well you need a reference of it. You can make a reference in your game instance, and when this actor is created, it saves a reference of itself in the Game Instance, then from your character, access the game instance and get the variable.

    Leave a comment:


  • replied
    ok i make a Blueprint Actor and want to call a function or a custum event in this BP.

    this blueprint is in the world placed.

    now i want to call the event or function via button from character or controller but this not work, buit work if i make with all actors of class. but i want cast to.
    Last edited by JUDGE DREDD VR; 07-09-2017, 11:37 AM.

    Leave a comment:


  • replied
    Depends from where you are calling the function. If your function is inside the character blueprint, you need a reference of the character saved somewhere (e.g Game Instance), unless you are calling it directly from inside the character blueprint. If you can give us some more details about what you are trying to achieve and you have right now we'll be able to help you better.

    Leave a comment:


  • replied
    not work

    only get all actors of class work

    Leave a comment:


  • replied
    Usually it's Get Owner for object, or Get Player Pawn when you cast to the player actor pawn character...

    Leave a comment:


  • started a topic Cast to a Blueprint Actor

    Cast to a Blueprint Actor

    Hello i have a Blueprint Actor and in this a Function

    i want to call this function from my Character but not work, only with get all actors of class work but not with cast to what i make false?

    what i need add as object in cast to? i try self

    and i try a variable with reference to the Blueprint.
Working...
X