playMaker

Author Topic: Call Method from Instantiated Object[SOLVED]  (Read 2944 times)

jrock84

  • Playmaker Newbie
  • *
  • Posts: 23
    • Divergent Worlds Interactive
Call Method from Instantiated Object[SOLVED]
« on: January 04, 2017, 12:10:52 PM »
Hello,

Simple, or not so simple, question. Haha. How do I go about using the 'Call Method' action with an instantiated player object? I am currently using 'Get Component' and storing vp_FPController as an Object variable and using that in the call method action, but none of the properties show up. They do show up at runtime, but obviously no way to set them at that point. I guess that makes sense, but how do I get around this?

Thanks!

« Last Edit: January 06, 2017, 10:17:30 AM by jrock84 »

Voss96

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Call Method from Instantiated Object
« Reply #1 on: January 04, 2017, 02:17:11 PM »
Call method never really works properly for me, however I always used invoke method which seems to work perfectly for me. As for runtime, are you using a global game object? That's what I'd store the game object with the script in

jrock84

  • Playmaker Newbie
  • *
  • Posts: 23
    • Divergent Worlds Interactive
Re: Call Method from Instantiated Object
« Reply #2 on: January 04, 2017, 03:24:19 PM »
I had tried that,  but unfortunately invoke method doesn't allow for setting of parameters so this won't work in this case. Yes, it is a global object variable set at runtime.
« Last Edit: January 05, 2017, 11:01:33 AM by jrock84 »

elusiven

  • Full Member
  • ***
  • Posts: 233
  • Debt we all must pay...
Re: Call Method from Instantiated Object
« Reply #3 on: January 06, 2017, 07:53:48 AM »
What usually happens for me is that when you run it once, then it somehow references what was at runtime and then you are able to set it based on the component object. You can always modify or create your own actions.

jrock84

  • Playmaker Newbie
  • *
  • Posts: 23
    • Divergent Worlds Interactive
Re: Call Method from Instantiated Object
« Reply #4 on: January 06, 2017, 10:05:00 AM »
Thanks for the reply! Unfortunately that doesn't work for me either. I wound up reverting to an earlier version of the call method action script and that works perfectly for me as it allows you to type in fields instead of just selecting from a drop down. Perhaps in a future version there can be the option? For reference I'm using the action from the following post.

http://hutonggames.com/playmakerforum/index.php?topic=7526.0

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Call Method from Instantiated Object[SOLVED]
« Reply #5 on: January 09, 2017, 02:02:10 AM »
Hi,

 can you make a bug report on this ( via PlayMaker menu), I think you raise a good point on allowing manual type definition and not just dropdowns.

 Bye,

 Jean

jrock84

  • Playmaker Newbie
  • *
  • Posts: 23
    • Divergent Worlds Interactive
Re: Call Method from Instantiated Object[SOLVED]
« Reply #6 on: January 09, 2017, 08:56:42 AM »
Be happy to! I'll get it done today.