playMaker

Author Topic: 1.6+1=1.6  (Read 2358 times)

cats00eye

  • Playmaker Newbie
  • *
  • Posts: 47
1.6+1=1.6
« on: October 26, 2015, 07:07:02 PM »
Please, can someone explain this screen shot? It is paused on the state following the state shown, with that subsequent state selected in the debug log window. HitObjScale and OwnScale are not changed in any way after the action shown. EvadeDistance is not changed in any way either. (The Float Operator action immediately following the offending action, which you can see the top of, divides EvadeDistance by another value and stores it in a different variable entirely.) Debug flow is on.

Foolishly attempting to think logically, I disabled all the actions following this offending action, and miraculously it showed the correct answer: 2.6... Encouraged, I re-enabled one action at a time, until - heart sinking - I found myself with all of them back on again and the correct answer still showing: 2.6... Angry, uncertain and paranoid now, I reran the scene with all the actions still checked: back it was to 1.6...

I need to be able to trust the damn thing to add numbers correctly. Right now, I am just about ready to sandpaper Unity and Playmaker from drive and brain, kiss goodnight to the Cheshire Cat and run away to sea.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: 1.6+1=1.6
« Reply #1 on: October 26, 2015, 07:34:57 PM »
Debug always reflects the latest information, so you're probably getting the value changed in the next frame or so and trying to step back and see it historically? There's no debug history stored.

You can add a breakpoint before this state is entered, then step one frame ahead and see at least if it is narrowed down to this state. Likely, something else is changing the variable as well.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

cats00eye

  • Playmaker Newbie
  • *
  • Posts: 47
Re: 1.6+1=1.6
« Reply #2 on: October 26, 2015, 09:12:15 PM »
Thank you for the reply. I thought the whole point of debug flow was it gave you the values of variables at the point you have selected in the debug log. (Which, at least some of the time, it seems to do.)

But now there's another thing... That variable OwnScale is drawn from a separate FSM which changes the object's mass, scale and so on. I did what you suggested and put a break point before the state. This time it showed 1.6+0. It took 0 for the variable (which is set to 1 in the inspector) because that FSM - which until now has always been the one FSM that has worked exactly as expected - wasn't starting! How? How could a start state not start? And it kept not starting. As I stepped through and through the scene - to the next state in any FSM, and the next - still, it didn't start. Seriously, there are just too many incomprehensible obstacles to making any progress. I would like all my energy to be focused on ironing out my own errors in the logic and make the game that is in my head, but it is extremely rare that I get that far. 99% of my energy goes into tearing my hair out. If there's some complex underlying logic to the order in which things are carried out, for instance, it would be useful to know it.

cats00eye

  • Playmaker Newbie
  • *
  • Posts: 47
Re: 1.6+1=1.6
« Reply #3 on: October 27, 2015, 05:54:20 PM »
I have redownloaded and reinstalled Unity, but problems persist and mulitply. The whole scene compile time suddenly shot up from about five seconds to twenty without any changes being made, except for the addition of a blank state for debugging purposes, and the compile time remains high after removing it. The object's motion, which had been smooth, is now visibly jerky, and remains jerky even if I move it with a single looped state and nothing else. Could this be a hardware problem? I have not noticed any ill effects anywhere else as yet and the pc is not old. Would this explain a start state not starting? Would anything else? Any help before I abandon this? (I'm not usually defeatest, but a start state not starting seems like a rock face - it really is the least you'd require of it.)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 1.6+1=1.6
« Reply #4 on: October 28, 2015, 11:21:53 AM »
Hi,

 what version of Unity are you using?

 Bye,

 Jean

cats00eye

  • Playmaker Newbie
  • *
  • Posts: 47
Re: 1.6+1=1.6
« Reply #5 on: October 28, 2015, 04:13:52 PM »
Version 5.2.2f1. As a last ditch effort, I'm starting from scratch. I think I'd assumed all start states start on the first update, but whether they do or not, I'm guessing it's bad practice to assume when they do or don't start and fix a hard order for FSMs using a central Main FSM or similar. I'm learning all this from a flat zero knowledge base, so apologies for all hair tearing etc. I think I've seen most of the pertinent PM tutorials, but haven't seen one specifically on organisation and controlling running order. I expect lack of a hard organisation could be the cause of some the problems I've been having, though I'm not sure about the performance issues.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 1.6+1=1.6
« Reply #6 on: November 02, 2015, 11:59:13 AM »
Hi,

I don't think the problem you are facing are linked with running order. I would think that either you have a gameloop or initial procedure that is using some very performant sensitive actions ( like "find" or reading saving prefs, things like that).

The other thing could be your scene itself, with maybe too much to load, like animations or textures. These parameters quickyl get out of control if you are not aware of their potential for disaster :)

 so, yes, start from scratch. Deep breath :) and go step by step. and watch the FPS ( plently of options to do that on the asset store).

 Bye,

 Jean