playMaker

Author Topic: PlayMaker is inconsistent.  (Read 2768 times)

KillerCreeper

  • Playmaker Newbie
  • *
  • Posts: 44
PlayMaker is inconsistent.
« on: May 06, 2019, 09:35:31 PM »
I am creating an inventory system and working on swapping items at the moment. I've got it to get the two item variables of each of the slots that are getting swapped and switching their variables with each other. It works the first time, then, the second time, it doesn't. Then, if you try it a third time, it works and it keeps going in this loop. I've looked very thoroughly into this and it is getting the right variables each and every time. It's literally like PlayMaker just doesn't want to use the set variable actions every second time.
Is this a bug with PlayMaker or is there something wrong with how I've put this together?

Athin

  • Full Member
  • ***
  • Posts: 163
Re: PlayMaker is inconsistent.
« Reply #1 on: May 07, 2019, 01:10:15 AM »
Hey there,

I'd guess you got something set up wrong with the states/order of events.  I can't quite tell from the pictures what the issue is without seeing the states and how they flow.

Are you able to post the state machine you think is causing the issue as well as the action in them?

KillerCreeper

  • Playmaker Newbie
  • *
  • Posts: 44
Re: PlayMaker is inconsistent.
« Reply #2 on: May 07, 2019, 01:25:55 AM »
Hey there,

I'd guess you got something set up wrong with the states/order of events.  I can't quite tell from the pictures what the issue is without seeing the states and how they flow.

Are you able to post the state machine you think is causing the issue as well as the action in them?
Okay. This FSM is on the Image(or Item) that is a child of the inventory slot, which is a prefab.
I believe that it is State 4 on the FSM that is causing the problem but I want to also post how State 8 works because they work together.
State 8 gets the parents of the item that was dropped(itemParent2) and the item that itemParent2 was dropped on to(itemParent). Then it sets their parent to the opposite of each and switches their position, that all works fine. State 4 is getting the Item variable from itemParent and itemParent2 and simply switches their variable values. Which, it works, but it doesn't work consistently, which is what I stated before.

KillerCreeper

  • Playmaker Newbie
  • *
  • Posts: 44
Re: PlayMaker is inconsistent.
« Reply #3 on: May 07, 2019, 01:26:32 AM »
Hey there,

I'd guess you got something set up wrong with the states/order of events.  I can't quite tell from the pictures what the issue is without seeing the states and how they flow.

Are you able to post the state machine you think is causing the issue as well as the action in them?
Also, here is the whole FSM if that is needed. Don't mind the swapEmptySlot transition and State 3 and 11. They do exactly what State 8 and 4 do and nothing activates the transition. It's purely for testing at the moment. The dropItem transition doesn't activate by anything as well.
« Last Edit: May 07, 2019, 01:30:39 AM by KillerCreeper »

Athin

  • Full Member
  • ***
  • Posts: 163
Re: PlayMaker is inconsistent.
« Reply #4 on: May 07, 2019, 02:10:55 AM »
Hey there,

So first off those var names are really hard to follow along without getting confused lol. 

Second I believe this is the source of your problem.  Need to use a variable as the parent for those 2 objects will turn out to be the same every other time which is the result you're getting. 

If that wasn't the fix let me know and I'll look a bit closer once I leave work :P


KillerCreeper

  • Playmaker Newbie
  • *
  • Posts: 44
Re: PlayMaker is inconsistent.
« Reply #5 on: May 07, 2019, 03:16:46 PM »
Hey there,

So first off those var names are really hard to follow along without getting confused lol. 

Second I believe this is the source of your problem.  Need to use a variable as the parent for those 2 objects will turn out to be the same every other time which is the result you're getting. 

If that wasn't the fix let me know and I'll look a bit closer once I leave work :P
The get and set parent actions are working correctly each time. It's the fourth state that is problematic, the set variables actions. It's getting the game objects correctly every single time, but it's just not setting them the second time, for some reason.
« Last Edit: May 07, 2019, 03:18:26 PM by KillerCreeper »

KillerCreeper

  • Playmaker Newbie
  • *
  • Posts: 44
Re: PlayMaker is inconsistent.
« Reply #6 on: May 07, 2019, 03:48:48 PM »
Hey there,

So first off those var names are really hard to follow along without getting confused lol. 

Second I believe this is the source of your problem.  Need to use a variable as the parent for those 2 objects will turn out to be the same every other time which is the result you're getting. 

If that wasn't the fix let me know and I'll look a bit closer once I leave work :P
This is a good example of what I mean.

KillerCreeper

  • Playmaker Newbie
  • *
  • Posts: 44
Re: PlayMaker is inconsistent.
« Reply #7 on: May 08, 2019, 04:27:39 PM »
I've tried so many things and nothing has been working...

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: PlayMaker is inconsistent.
« Reply #8 on: May 08, 2019, 04:29:48 PM »
I'll see if I can repro here. You don't happen to have a repro project you could email me?

KillerCreeper

  • Playmaker Newbie
  • *
  • Posts: 44
Re: PlayMaker is inconsistent.
« Reply #9 on: May 08, 2019, 07:06:58 PM »
I'll see if I can repro here. You don't happen to have a repro project you could email me?
I don't... But I can give you the exact, full fsm actions and state. Unless you mean if I can just copy my project and send it to you?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: PlayMaker is inconsistent.
« Reply #10 on: May 08, 2019, 08:02:59 PM »
Either would be good. Can you send to my email. Thanks!

KillerCreeper

  • Playmaker Newbie
  • *
  • Posts: 44
Re: PlayMaker is inconsistent.
« Reply #11 on: May 08, 2019, 09:10:37 PM »
Either would be good. Can you send to my email. Thanks!
How exactly do I get your email? If I try to email you from the forums, I don't get any attach file options.

KillerCreeper

  • Playmaker Newbie
  • *
  • Posts: 44
Re: PlayMaker is inconsistent.
« Reply #12 on: May 09, 2019, 01:35:18 AM »
I'm starting to think this is a bug or something with PlayMaker. I think there is a bug with getting or setting fsm varialbes, or both.
« Last Edit: May 09, 2019, 01:47:17 AM by KillerCreeper »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: PlayMaker is inconsistent.
« Reply #13 on: May 09, 2019, 01:47:30 AM »
Hi.
If you press on the e-mail icon you get the email page.
From there copy paste the e-mail address to the email service that you are using.

For a complete project you can use something like WeTransfer
If you do so you should zip or rar your project and add a password to it.
Then mail the link to Alex (with the password).

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: PlayMaker is inconsistent.
« Reply #14 on: May 09, 2019, 01:54:50 AM »
hi.
Maybe you make a scene with some standard object, with the same setup and see if the issue is still there.
if so you can share the scene here, so i can have a look as well