playMaker

Author Topic: 0+1=2?!  (Read 1963 times)

Pawel

  • Junior Playmaker
  • **
  • Posts: 93
0+1=2?!
« on: July 03, 2013, 10:06:28 AM »
I am running into a strange issue. Not sure if it is a bug, or I got this wrong in my head...

I have thee Actions:

1) Get FSM Int (OtherInt variable from another FSM which I save to an int variable MyInt)

2) Int Add (add 1 to MyInt)

3) Set FSM Int (Variable name: OtherInt  Set Value: MyInt)

When I start, OtherInt typically is 0 -- this is also what it shows when I disable IntAd. However I never get 1 as a result of adding 1 to zero -- the OtherInt always shows 2 in the inspector...

Is it a bug or am I wrong in my logic?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: 0+1=2?!
« Reply #1 on: July 03, 2013, 10:52:06 AM »
MyInt probably starts as 1.

Unless on your other fsm you're doing something that is adding to the number after between it being received from the IntAdd fsm.
« Last Edit: July 03, 2013, 10:56:14 AM by Lane »
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Pawel

  • Junior Playmaker
  • **
  • Posts: 93
Re: 0+1=2?!
« Reply #2 on: July 03, 2013, 01:25:01 PM »
The other object (empty) only has one action: Set Int... (variable "OtherInt" value: "0")

Besides once I deactivate the Int Add the inspector shows OtherInt as 0...

Since I have the object that has the 3 actions on a global event, my thought is that somehow the event is triggered more then once... This is what I am investigating now...