playMaker

Author Topic: FSM name changes not recognised when using Set FSM variable actions  (Read 3305 times)

jess84

  • Hero Member
  • *****
  • Posts: 515
I guess this is probably halfway between bug and feature request, but I'll put it here anyway.

This has been bothering me for a while, and resulted in things not working and then having to track down the cause;

If you use an action where you're selecting another FSM from the dropdown (e.g. Set FSM Float), if the name of that target FSM changes, it is not automatically updated. Therefore the action is looking for an FSM that no longer exists.

It then means manually tracking down all of these situations.

As this behaviour is different to other similar situations, such as renaming an object or a gameobject (which is updated fine), it would be a nice to have functionality.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: FSM name changes not recognised when using Set FSM variable actions
« Reply #1 on: March 05, 2014, 12:01:00 PM »
Did a quick test on this..

It still seems to work despite the names being different, but yeah the name displayed is the old one. Is it actually breaking the connection for you?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

jess84

  • Hero Member
  • *****
  • Posts: 515
Re: FSM name changes not recognised when using Set FSM variable actions
« Reply #2 on: March 05, 2014, 12:08:44 PM »
yeah, it breaks the link for me. (so float variables in other FSMs on the same prefab not being set)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: FSM name changes not recognised when using Set FSM variable actions
« Reply #3 on: March 06, 2014, 12:02:41 AM »
Hi,

 yes, Fsm names are not "Pointers", so you have to use this with extrem care indeed.

when I start using these kind of action, I enforce a very strict policy of "name it and never rename", which also means that I careful name each fsm so that I don't have to refactor them later and other parts of my project can rely on fsm names.

 When this is not good, like when I know this is a work in progress and I am not sure myself where this is going, I don't rely on this and go for global event that I fire to a gameobject specifically ( the one with this fsm that I don't trust by name) and then problem is solved, I do the work inside the fsm that simply catch this global event, likely getting data from it and storing into it itself into its own variables.

 I would however enjoy a proper pointer system like events and variables... maybe one day:)

bye,

 Jean