Here's a tough Question...

ozboybrianozboybrian PRO Posts: 2,102
edited February 2012 in Miscellaneous
I have a Rule.

When actor hits bullet.
Game.Bullethit to game.bullethit - Random(1,3)
But I have a conflicting rule that says.
When game.bullethit ≤ 0 change attribute Game.Bullethit to 3.

Here's where it gets harder... How do I make it so that when the random bullethit is "-3" to make another actor appear?
Because when it does that. I want the actor say "Critical Hit" because it took off three damage.

Not sure if it's possible but would love see some ideas.

Thanks guys!

Brian :D

Comments

  • aarioaario Member, PRO Posts: 256
    edited February 2012
    Just make a separate attribute for your random number, like.. game.Random

    then you can put in the bullet actor, see below..

    When Actor collides with bullet;
    -change attribute [game.Random] to [-random(1,3)]
    -change attribute [game.Bullethit] to [game.Bullethit+game.Random]
    Then you can call out a rule that says when;
    -game.Random = -3 --> game.Critical=true

    Now about the "When game.bullethit ≤ 0 change attribute Game.Bullethit to 3"

    Try making an actor level boolean called actor.Dead.
    Then when you call on the actor you change actor.Dead to false
    Have a rule that says when game.bullethit ≤ 0 change actor.Dead to true.
    Then when actor.Dead is true change attribute game.Bullethit to 3.

    That should hopefully get rid of any conflict.

    Hope it works for you,
    Aaron
  • ozboybrianozboybrian PRO Posts: 2,102
    Great idea! can't believe I hadn't thought of that. Thanks mate! :D
  • aarioaario Member, PRO Posts: 256
    No prob :)
Sign In or Register to comment.