Explosion effect only affects the last actor spawned

mturner000mturner000 Member Posts: 9
edited November -1 in Working with GS (Mac)
I'm spawning "runner" objects (my Actor) at one every 2 seconds. At random intervals I spawn a "bomb" actor that that blows up after a random number of seconds. The effect I want to happen is when the bomb blows up it will destroy any runner object within the blast radius. (I'm using the formula shared by t-shirtbooth in his tutorial). The problem I'm facing in testing is that the blast effect only affects the last actor spawned, any other actors are not affected by the blast even though they are within the blast radius. Any ideas as to why that might be, and how I might fix that issue?

Thanks,

Mark

Comments

  • djdeedjdee Member Posts: 180
    am having the same problem nd my future spawning gets destroyed by them self. i want the blast to last for a few seconds and go away. can some1 help us??
  • POMPOM Member Posts: 2,599
    Does your actors has a self attributes that is changed during the blast?
    Like "self.blast" is becoming TRUE or something ?

    Photobucket Roy
  • MotherHooseMotherHoose Member Posts: 2,456
    the condition of the boomAttribute in that tutorial triggers action/event … as Tshirtbooth explains in the video

    on runnerActor:
    the rules that are initiated when game.boom =1 … should be first in that actor's list of rules/behaviors

    on spawnActor:
    Rule: when
    Attribute: game.boom = 0
    --Spawn

    on bombActor:
    behavior to changeAttribute game.boom To: 0
    … must be above the Destroy behavior

    ===
    to have the blast last a few seconds: instead of changeAttribute (as above)
    Interpolate: game.boom To: 0
    Duration: the seconds you want it to last

    on bombActor boolean type attribute …exploded
    Rule: when
    Attribute: game.boom =1
    --changeAttribute: self.exploded To: true

    Rule: when (All)
    Attribute: game.boom = 0
    Attribute: self.exploded = 1
    ---Destroy this actor

    @};- MH
  • djdeedjdee Member Posts: 180
    edited March 2012
    @motherhoose
    hey mh i would like 2 use interpolate nd want the blast last a few seconds.
    can u please let me know which is the TNT nd the actor that has to b destryoed in this... its really confusing
    it would be very kind of u if u clear;y explain this once more. sry i am new 2 this.....
    thank you
  • MotherHooseMotherHoose Member Posts: 2,456
    edited March 2012
    @dijdee … email me your project
    my name at gmail

    @};- MH
    "Games lubricate the body and the mind." — Benjamin Franklin
Sign In or Register to comment.