playMaker

Author Topic: [SOLVED] Script to Playmaker Data  (Read 1571 times)

Retrokat

  • Playmaker Newbie
  • *
  • Posts: 5
[SOLVED] Script to Playmaker Data
« on: January 13, 2022, 01:50:23 AM »
Hi

I am trying to get data from a script event and I am not having much luck :(

I have it set up to send an event (see attached) and it triggers a transition in Playmaker but I get no data from that.

If I make an event that sends a broadcasts message (string) or sendmessage (string) I get an error in the console saying there is no receiver so I know that data is being Boadcast/sent, I just cant workout how to receive it in Playmker as a float/int etc to use.

Any help would be much appreciated!

p.s. I have tried the event proxy wizard but didn't have any success with it.
« Last Edit: January 16, 2022, 12:54:35 PM by Retrokat »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Script to Playmker Data
« Reply #1 on: January 13, 2022, 09:22:57 AM »
Hi.
Try moving the targeted fsm to the top in the hierarchy.

it will work only on the 1st fsm in the hierarchy as far as i know

Retrokat

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Script to Playmker Data
« Reply #2 on: January 13, 2022, 11:29:32 AM »
Thanks for the tip :)

I put the object I have the FSM on that I want to receive the data at the top of the hierarchy but I still get the same error:

BroadcastMessage Hello has no receiver!
UnityEngine.Events.UnityEvent`2<ulong, int>:Invoke (ulong,int)

I most likely do not have the field that receives the data setup properly I would imagine. I have been naming everything I can to match the Broadcastmessage text field to see if that helped but no luck :(

In the error message I can see it is sending a ulog and an int, I only need the int data if that helps with working it out.

I have also tried sending it as an event and using the Get Event Info action but that doesn't receive any data in any of the fields.

Thanks so much for helping!

Retrokat

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Script to Playmker Data
« Reply #3 on: January 14, 2022, 03:46:22 AM »
Hopped onto the discord and Preston helped me out immensely with code to add to the script I needed the data sent from! Wouldn't have been able to do it without his help! Will be following his Little Owl Gaming Youtube channel for more tips too  :D

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: [SOLVED] Script to Playmker Data
« Reply #4 on: January 14, 2022, 11:24:14 AM »
Hi.
Welcome to the Playmaker Discord Channel :)