Weird Bug

tutysestutyses Member Posts: 134
edited January 2013 in Working with GS (Mac)
Hello everyone!
I started a new project a few days ago, and i am already facing a big Bug. There is almost no code, and it's so simple! i dont why it doesnt work
Basically i have a Zombie walking from left to right, the zombie has 2 different actors, one for the head and another one for the body. When i shoot the head it changes ZOMBIEHP to ZombieHP-100, and when i hit the body it Changes ZOMBIEHP to ZOMBIEHP-50
There is a rule in the body which says that if the ZOMBIEHP Is lower or Equal than 0, it will be relocated to the left part of the screen, and the life will be changed to 100 again
The problem is that sometimes the zombie WILL NOT DIE and the life will go to negative numbers, it s like the rule isnt working but i dont know why!
If i deactivate the collision of the head it does work well, if i deactivate the body collision, it does work well too, the problem is when both are activated.
The bug is solved if i put the rule which checks if zombiehp is lower than 0 inside a timer, but i dont want to do this for every zombie on Screen

Here is My project http://www.putlocker.com/file/51FEA5384CF801DB
To see the bug in action, aim to the head, and in less than a minute you will see it

Comments

  • mrpacogpmrpacogp Member Posts: 400
    Is a windows version really? I have downloaded bug-zip.exe??
    You use for your attribute real o integer values? Game values or player values?
    I recommended you to put a text on scene to display the real value on any moment for evaluate the problem.
  • tutysestutyses Member Posts: 134
    What? I m on MAC . I Think you clicked in the wrong download button, i know its confusing with too many ads. You downloaded putlocker download manager. Click on the middle button, the one which says, Click to download
    I already have text displays showing the attributes but trust me, it wont help me :P it s a pretty weird bug
  • tutysestutyses Member Posts: 134
    I have tested a little more
    If i change the Overlaps or Collide Event and instead of it i activate the behavior pressing the Key on the Keyboard it wont be bugged
    Is this a Gamesalad Bug with Overlap Or collide?
  • tutysestutyses Member Posts: 134
    I made a rip With only the very basic things please someone check it out i dont care if you dont find the answer i just want to know if i am doing something very stupid or it s a real gamesalad bug
    Here is the project https://mega.co.nz/#!mwwkXAwZ!FwNFwRasIIL98igNpQT7BAi8QjxsywtRz-aVpsBp_O0
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited January 2013
    The problem is that sometimes the zombie WILL NOT DIE
    You should have known better than to work with zombies. :P

    Alright, I'll take a look and see if I notice anything.

    Edit: it took me three tries to download the file correctly. PutLocker @#*(%&;%*!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited January 2013
    Pretty sure the problem is that your rule that checks if the zombie's HP is less than or equal to zero is within the rule that checks for a collision with the fireball. That rule is only going to function correctly at the exact instant the fireball hits it. If anything is slightly off in the timing, it will ignore the rule to reset itself.

    Take the "death" rule out of the collision rule and see if that fixes it. Edit: it didn't fix it for me. I suspect it's a timing issue... that the HP is being reset at same moment that the fireball is hitting the zombie. Try adding a timer after 0.1 seconds for all of your reset HP & position behaviors so that they fire slightly after the fireball is destroyed.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Yep, that seemed to fix it:

    image

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • OskarDeveloperOskarDeveloper Member Posts: 533
    Use Dropbox for your uploads :)
  • tutysestutyses Member Posts: 134
    edited January 2013
    THANK YOU ! The bug seems fixed
    I have been using gamesalad for 2 years, but i have to take a break because i had to buy a 64 bit mac and i didnt have time either, so i am a little rusty now, It would take me several days more or even a week to figure it out
    thank you again :P
    Edit: i hate to ask people for help but this was bothering me so much
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Asking for help is what these forums are all about. :)

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.