User Tag List

Results 1 to 3 of 3

Thread: Help with resetting alterable values

  1. #1
    Clicker Fusion 2.5iOS Export ModuleXNA Export Module

    Join Date
    Oct 2009
    Location
    Jacksonville, TX
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Help with resetting alterable values

    Hi everyone! I could really use some help with a tricky issue I have run into, hope someone out there can shed a little light on this. Here is a brief explanation of what I am trying to do, and the strange results I am getting:

    -Spread value in Alterable Value A (PieceID) of all black and white game pieces at Start of Frame
    -Start loop “DetectGaze” (total number of game pieces) times
    -On loop “DetectGaze”, if PieceID of game piece = loop index of “Detect Gaze”, reset all InGaze values for target game piece to (0)
    -On loop “DetectGaze”, if PieceID of game piece = loop index of “Detect Gaze”, move target game piece up, down, left and right in turn, testing for overlaps with other game pieces
    - On loop “DetectGaze”, if target game piece overlaps a game piece of opposing color, set the corresponding InGaze value of opposing piece to PieceIndex (Alterable Value P) of target piece
    -This lets each game piece know which opposing piece is looking at it from each direction

    This is currently working great for all the white game pieces, however for the black game pieces the InGaze values are all getting reset to zero. I am really having a hard time understanding this! It is the same event that resets the white and black game pieces to zero before running the “DetectGaze” loop, and all the events happening in the loops are identical, but for some reason the InGaze values for the black game pieces are getting forced back to zero, while the white game pieces are holding their assigned InGaze values just fine. I have tried about everything I know how to do, and still can't understand what is going on here. Any help would be very much appreciated, thanks!!!
    Attached files Attached files

  2. #2
    No Products Registered

    Join Date
    Apr 2013
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's simple really, the culprit is line 171 where you reset your values, problem is in what order you are doing this. I will try to explain as best I could, but it may be above my English skill.
    First you reset values for one of the piece, then you detect gaze in whatever direction you need and set InGaze value of opposing piece. The thing is that GazeIn values are set in opposing loops(white pieces gets them set in black loop and vice versa). By the time you are looping though black pieces, white loops have already finished and set their InGaze values properly but it will reset them again. Basically its coincidence that it works for white and not black, it's all thanks to their PieceID values that are in first white then black order.
    All you need to do is reset the values before you run DetectGaze loop.

  3. #3
    Clicker Fusion 2.5iOS Export ModuleXNA Export Module

    Join Date
    Oct 2009
    Location
    Jacksonville, TX
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey thanks BigHatLogan! I tried moving that event to the line just before I started the "DetectGaze" loop, switched the condition to "Always", and it works like a charm. Believe it or not I have been puzzled by this for a few days... Man that was one of the easiest fixes ever. I really appreciate the help, thanks a million

Similar Threads

  1. Global Values resetting?
    By Kolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 2nd December 2013, 08:49 AM
  2. Global Values & Alterable Values with same names
    By Gustav in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th November 2012, 06:15 PM
  3. Alterable Strings as Alterable Values?
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 27th March 2012, 07:14 PM
  4. Display values on screen from Alterable Values
    By mikeh in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 13th May 2008, 01:59 PM
  5. Alterable Strings and Alterable Values limit :(
    By Pedro Almeida in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th October 2006, 06:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •