Actor Issue?!

FF1FF1FF1FF1 Member Posts: 75
edited November -1 in Working with GS (Mac)
Hi, I have a major issue with my game that needs a smart fix!

(tried for 2 days now!) Don't think it's possible...

I have a ball actor and 2 power-ups (Fire and Ice)

If ball hits Fire, fire attribute changes to 1 (fire)
If ball hits Ice, fire attribute changes to 0 (ice)

Problem is that the ball is the same actor, so all multiple balls will change to ice or fire (if theres more than 1 ball, which there is)

and if fire attribute = 1 then wood can burn

Please need help, Cheers! :-)

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    Have you tried using self.fire instead of game.fire?

    Darren.

    image
  • FF1FF1FF1FF1 Member Posts: 75
    I have a little but not sure if that would help much, need like a chang actor option, but nothing like that, any other ideas? Really need this fixed, cheers.
  • UtopianGamesUtopianGames Member Posts: 5,692
    Can you not change the image? Have a rule if fire=0 set it to this at start then change image into original if fire=1 change to ice and change image and if fire=2 change to fire and change to fire image.

    I would use self.fire instead of game.fire then each actor will act differently.

    Darren.
  • FF1FF1FF1FF1 Member Posts: 75
    I can change the image that's ok, but I need fire to destroy wood actor with collide... Yer changing actor is all good, I'll have a play with it when I get in, and I'll post back cheers thanks allot.
  • FF1FF1FF1FF1 Member Posts: 75
    ok, its good it changes each actor separately (should have realised this as I have done it with my other powers!DUH)

    However one more issue! to be fixed PLEASE..

    I need the wood to be destroyed only if self.fire=1 ???

    If I put it in a game.fire=1 I get the same issue as I did to begin with ? need some smart advice! cheers again very much :)

    FF1FF1
  • FF1FF1FF1FF1 Member Posts: 75
    OK, looks like I have solved the second half THANK YOU very much for the fist half! :D

    After that I made it so --

    If self.fire=1 and overlap with wood then game.fire=1 then
    If game.fire=1 and ball overlaps with wood then destroy wood

    does that look right ? It does work ok!
  • FF1FF1FF1FF1 Member Posts: 75
    One more thing would make me very happy!

    Is there a way to make an actor say a certain amount of pixels from another ?
    in X & Y ?

    Like 6 squared pixels or something ?

    Thank you.
Sign In or Register to comment.