playMaker

Author Topic: Can you use custom classes in Playmaker?  (Read 1144 times)

SuperFlyGames

  • Playmaker Newbie
  • *
  • Posts: 3
Can you use custom classes in Playmaker?
« on: May 14, 2021, 05:08:21 PM »
Hi,

I am currently working on a football manager-esqe game and this is the first time using Playmaker. Normally I would just code the game, but I thought I give Playmaker ago.

So my questions is, can I use custom classes in Playmaker? For example:

I want to create a Match class(Match meaning football match). If I was coding this traditionally I would create a class called "Match" that would contain variables and custom variables such as:

Code: [Select]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Match : MonoBehaviour
{
    public playerTeam [Players];
    public oppositionTeam [Players];
   
    public venue Venue;
    public tournament Tournament;

    public kickOffTime int; 

}

As you can see in that example code the class I want would use other custom classes as well.

Is there anyway of implementing something like this in Playmaker? I have looked around but cannot get my head around it.

Any information would be really appreciated.

Many thanks,
Dan

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Can you use custom classes in Playmaker?
« Reply #1 on: May 14, 2021, 06:51:28 PM »
Hi.
Maybe the Playmaker API can help

Also this Scriptable Object thread might be interesting for you.

https://hutonggames.com/playmakerforum/index.php?topic=20829.0


To use with actions and to get some data, for example Venue (assuming it holds string)
You might need to convert it to a FsmString