playMaker

Author Topic: New var types: FsmPair and FsmTable  (Read 254 times)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 716
New var types: FsmPair and FsmTable
« on: August 18, 2022, 02:21:48 PM »
There's already a FsmArray variable and it possible to create arrays within an action by simply using square brackets alongside any recognized FsmVar type, such as FsmString[ ] for example.

It would be very nice for Hash Tables to be integrated into Playmaker without relying on proxies by introducing a FsmTable variable tybe.
Also, actions would also rely on the all new FsmPair[ ] which would essentially emulate a Hash Table within an action, which from there could be expanded as far as the user wants to use (the user enters the number of pairs he wishes to use, which expands the action's panel accordingly), and from there, add or modify such pairs.
A FsmPair variable type could be created to allow users to associate two values such as {string; float}, {string;string}, {int;bool}, {enum;color}, etc.
Then the list of FsmPairs could be saved into a FsmTable, or a FsmTable could be loaded into as many FsmPairs as needed.
Another action would allow the key or value of a pair to be saved in a FsmArray.
The possibilities are numerous!

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 716
Re: New var types: FsmPair and FsmTable
« Reply #1 on: August 18, 2022, 02:36:55 PM »
Following this, a FsmTriplet could be considered for a structure such as {value;value;value}.

Theoretically, could it even be possible to create a variable that could be as rich in its number of carried values as wanted?