Hi,
In old version, I needed to define BP interface to call the functions of the BP from other BP. But, now, I can add variables having the type of BPNAME_C or cast variables to the type and can call functions directly. It’s very useful. This is an important update. Thank you!
But, I met a problem. I defined a certain function that it’s input is BPNAME_C. And then, in BPNAME event graph, I tried to call the function with Self. But, it was impossible. The error message is “object’BPNAME_C’ is not compatible with object’BPNAME_C’”, like the screenshot.
I think this is a bug of Blueprint or error message.
Rocket gets better and better. I enjoy it.
Thanks in Advances,
Kazuhisa Minato.
i encountered something similar and already reported it here, still no answer but i managed to work around it. You could try making Pawn the superclass of ‘Self’ and then in your function cast it to PNPawn_Rabbit_C.
Hey Kazuhisa,
Thanks for your report! In this case, what your setup is trying to do is register the Pawn’s Blueprint itself (that’s the Self reference) with your SecurityGate and not an instance of your Pawn Blueprint. An actual instance of the Pawn would be one that is placed or spawned in your Level or Level Blueprint. What you would want to do to properly have your Pawn register in this setup would be to do the exact same call you have here, but in the Level Blueprint, with a couple of changes–for example:
In this case, the Level Blueprint gets the Player Pawn and casts it to the correct type of Pawn that you need in order to pass it to your Register Pawn function, and then performs the function call using a Security Gate that is placed in the Level.
All of the Blueprint Communications functionality is still pretty new, so if you need any further explanation, please don’t hesitate to ask
Thanks!
-Steve
Hi Steve,
Thank you for your answer. I understood some of why, but I’m still confused. You said my SecurityGate variable is not actual instance. But I can not link self reference to a parameter of event like Overlap.
The ‘Other Actor’ at OnComponentBeginOverlap should indicate an actual instance of placed Blueprint, right? If I changed the type of the “JumpingBoard” parameter ‘Actor’ class, I can link ‘self’ reference to the parameter connector.
In C++, programmer often write the code to hand “this” pointer to other instance came from event callback. It’s sad that I can’t write the same logic in Blueprint.
Anyway the error message “Object’A’ is not compatible with object’A’” looks strange.
Thanks,
-Kazuhisa Minato.
Hey Kazuhisa,
One of our recent internal blueprint updates fixes this problem and should alleviate the “not compatible” message you get when trying to use setups similar to this one. We expect this update to be included in an upcoming Rocket Beta release.
Cheers,
-Steve