playMaker

Author Topic: Get/Set FSM actions... issues abound.  (Read 7815 times)

Red

  • Hero Member
  • *****
  • Posts: 563
Get/Set FSM actions... issues abound.
« on: December 17, 2013, 05:51:27 PM »
I've had some issues occur with the systems I'm working on... And I'm at a total loss as to why this is even happening.

What I have is as follows (and I'll post screenshots below)

I have the setup system for my game reaching into the mesh object to fetch the effects objects and the mesh objects of the various weapons that each character class and mesh object have... So, a machine gun or grenade... an RPG or a handful of shuriken... that kinda thing.

But there seems to be some issues here. The system is using the Get fsm actions and the set fsm actions to connect the mesh/fx objects with the mechanisms that use them... BUT... it is only working when I put a breakpoint in there.

I've tried with a wait, no dice... With a next-frame-event, still nada... But when I put a breakpoint in the state after that (so as to break it when that state is finished functioning) and resume the game in Unity, only then does it seem to work.

I'm running up against a brick wall here trying to figure out what's going on but the debug systems aren't really reporting when they fail to trigger the action


Red

  • Hero Member
  • *****
  • Posts: 563
Re: Get/Set FSM actions... issues abound.
« Reply #1 on: December 17, 2013, 06:51:29 PM »
I tried adding in a more dynamic system to address this issue... more screenshots below.

The issue is still happening... It's as if the Set FSM actions aren't completing in time before the state goes to the next one.

So, I guess this then begs the question... is the finished action firing off prematurely? So far it's either that or the action itself isn't working as expected every time.

If you have any suggestions on how to troubleshoot this, I'm all ears.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get/Set FSM actions... issues abound.
« Reply #2 on: December 17, 2013, 06:55:48 PM »
Have you tried firing a special event rather than the system FINISHED?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Get/Set FSM actions... issues abound.
« Reply #3 on: December 17, 2013, 07:21:56 PM »
Yeah...  :-\  Both with a next frame event and a wait to trigger the transition to the next state.

So, I guess if this behaviour is occuring regardless of it being a finished or custom transition, that leaves the issue seeming to be from the Set fsm action itself.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get/Set FSM actions... issues abound.
« Reply #4 on: December 17, 2013, 07:51:11 PM »
Have you tried making those states Action Sequences with a Next Frame Event on the end? (gear icon uppermost right)
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Get/Set FSM actions... issues abound.
« Reply #5 on: December 17, 2013, 08:37:47 PM »
Yes... Though what does that mean? (couldn't find anything in the help files that even explains what's inside that little menu.)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get/Set FSM actions... issues abound.
« Reply #6 on: December 17, 2013, 08:54:56 PM »
Action Sequence forces the sequence of actions to complete each one before moving to the next action or finishing.

Hmm, sequencing is definitely my first guess but the whole working when using breakpoints is really weird. If it's absolutely always when using Set FSM Game Object then that would be my next guess but I've yet to have any trouble with it.

Should the FSM target name be "Handgun/Mechanism" ? It looks like you may be stacking FSM names but I don't see the / character. I can't quite see how the logic completely ties together but it looks like with all of that hierarchy and interchanging data you could be failing the Set FSM Game Object with a bad name and having some other logic somewhere else that recovers or creates something from other shared data? I had some pretty weird results when doing the shop with a similar setup, accounting for all events filling the variable, then backchecking names, variables and events at runtime helped find any mistakes I had.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Get/Set FSM actions... issues abound.
« Reply #7 on: December 17, 2013, 09:04:58 PM »
well, the naming of the FSMs themselves was changed from "(weapon name) Mechanism" to simply "Mechanism" so that I could clear up any issues with it mistaking the name or missing something.

Backchecking... I know that I'm really showing my noob-ness with that, but is that meaning a way, once the data is supposed to have been passed, of going back and doing the system over again if it messes up?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get/Set FSM actions... issues abound.
« Reply #8 on: December 17, 2013, 09:15:31 PM »
well, the naming of the FSMs themselves was changed from "(weapon name) Mechanism" to simply "Mechanism" so that I could clear up any issues with it mistaking the name or missing something.

Backchecking... I know that I'm really showing my noob-ness with that, but is that meaning a way, once the data is supposed to have been passed, of going back and doing the system over again if it messes up?

I just meant that checking back across your FSM's that are related to see if there were any possible naming errors or odd-ball object assignments. If you're certain it's all good man I don't know whats going on there. I still feel skeptical that its related to the action since I've used it thoroughly for the same thing without any trouble.

Maybe Jean will have some ideas.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Get/Set FSM actions... issues abound.
« Reply #9 on: December 17, 2013, 10:05:05 PM »
Yeah, I'm about as mystified as you are.

It's the whole breakpoint thing that's really making my head go wonky trying to figure it out.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get/Set FSM actions... issues abound.
« Reply #10 on: December 18, 2013, 05:31:47 AM »
sigh :)

I like the "Maybe jean will have some ideas"   :P  pressure is on now!

Ok. yes, your issue is odd. when I have this problem, I put debug logs right inside the actual actions themselves... not good for all of you that don't know how to script... sorry.

@Red: can you do that? when I am think I am sure an action should be called but is no, I put a breaking next to the line that should be performed, and then I see if this action is called indeed, and if it is, what values it holds truly. You may have conflicting fsms, I see a lot of disabled actions, I never leave any disabled actions in my fsm, never, so that could be a potential issue here.

Also, I would already completly stop everything if using a manual send event or next frame event would not work. Create your own event like "DONE", and don't rely on the built in "FINISH", and don't call "FINISH" manually, refrain from doing so, it's confusing.

also, can you isolate the offensive state? and see how it performs on its own? create a new scene, and have this state only as the start state and form around it the same data setup you have and see how it performs.

the key here is cut down on the potential issues surrounding this state and actions. so the worse scenario is to work on a copy, and take down features one by one, I mean lietterly delete them until the problem disappear and then you know the problem was in your last deletion ( or at least related).

bye,

 Jean

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Get/Set FSM actions... issues abound.
« Reply #11 on: December 18, 2013, 07:49:20 AM »
sigh :)

I like the "Maybe jean will have some ideas"   :P  pressure is on now!

haha, sorry man ;)
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get/Set FSM actions... issues abound.
« Reply #12 on: December 18, 2013, 08:28:46 AM »
  :-[

No worries, I was joking.

Bye,

Jean

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Get/Set FSM actions... issues abound.
« Reply #13 on: December 18, 2013, 11:54:04 AM »
well, fresh scene with only the player object (and a cube for it to walk on and a plain camera) and the behaviour still persists. (including the breakpoint thing)

As for reaching into the code, I'm not totally sure I'm doing it right but I copied the line LogWarning("Could not find variable: " + variableName.Value); and removed the variable at the end and changed the "Could not find variable" into "success" and "null."

(Though, when I did that, monodevelop asked me if I wanted to convert some line endings. I clicked the convert one time, didn't seem to cause issues... reloaded playmaker from the asset store and tried it with the "keep" option, didn't seem to cause issues... I'm going to try and re-install playmaker to test if simply adding a space (So as to trigger Monodevelop's "save" button) will do the same thing.

But when I made those changes, it reported that it went through successfully (and the behaviour is still persisting.)
« Last Edit: December 18, 2013, 11:57:23 AM by Red »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get/Set FSM actions... issues abound.
« Reply #14 on: December 19, 2013, 02:25:14 AM »
Hi,

 Can you send that test scene over? and I'll try to replicate and pin point the problem.

bye,

 Jean