Multiple bombs?!

Hello guys!
The problem is when i put more than one bomb in the scene the other bomb loses his power
Somebody know what i can do?

Thanks :)

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Well, it's impossible to tell because we don't know what your game is about, and more importantly, we don't know how your rules are set up. We'd need screenshots...
  • ORBZORBZ Member Posts: 1,304
    Possible, but tricky.
  • mmmodelmmmodel Member Posts: 46
    edited June 2013
    Right! i have the collide set..
    and the rule for the bomb is
    when touch is pressed{
    change att game.blastx to self.position.x
    change att game.blasty to self.position.y
    change att game.boom to 1
    timer after 0,5
    destroy actor

    and for blocks
    bomb rule{
    change att self.distancefromblast to magnitude( game.blastx - self.Position.X , game.blasty - self.Position.Y )
    }
    rule
    att self.distancefromblast < 120
    change vel direction :(vectorToAngle(-( game.blastx - self.Position.X ),-( game.blasty - self.Position.Y )))
    speed: 360-self.ditancefromblast

    rotate to angle direction: (vectorToAngle(( game.blastx - self.Position.X ),-( game.blasty - self.Position.Y )))
    speed: 90

    i think is that :P
    @Braydon_SFX
    @ORBZ
  • mmmodelmmmodel Member Posts: 46
    I can't make the other bomb works 8-X
  • TokuharaTokuhara Member Posts: 94
    By looking at your code looks like you need to put a condition inside your box rules.

    Example:
    Box rules

    "Rule if attribute game.boom is true"
    change att self.distancefromblast to magnitude( game.blastx - self.Position.X , game.blasty - self.Position.Y )
    }
    Rule
    att self.distancefromblast < 120
    change vel direction :(vectorToAngle(-( game.blastx - self.Position.X ),-( game.blasty - self.Position.Y )))
    speed: 360-self.ditancefromblast

    rotate to angle direction: (vectorToAngle(( game.blastx - self.Position.X ),-( game.blasty - self.Position.Y )))
    speed: 90
  • mmmodelmmmodel Member Posts: 46
    edited June 2013
    @Tokuhara sorry i forgot to put in the post this bol rule of the blocks
    att game.boom = 1
    and then the bomb works, but if i use other in the scene the explosion not happens
    hauehuaehuae :P
  • mmmodelmmmodel Member Posts: 46
    edited June 2013
    now is working :P
    i did in the bomb one otherwise change att game.boom to 0
    @Tokuhara u helped me a lot, thanksss! :)
  • TokuharaTokuhara Member Posts: 94
    Good luck! :D
Sign In or Register to comment.