How to make an actor grow until it hits something

Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
edited November -1 in Working with GS (Mac)
Hey all,
I've been trying to get my head around this all day. Trying different things, but it doesn't seem to be working properly.

What I want:

I want so when my actor stops moving, it grows until it hits another object. Easy huh?

Thanks for your time,
Bray

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    you will need an attribute called 'growMe' (or whatever)

    Change Attribute: growMe To: 1

    When growMe = 1
    --start timer (every .025 seconds)
    ----Change Attribute: self.Size.Height To: self.Height.Width +1

    When growMe = 0
    --start timer (every .025 seconds)
    ----Change Attribute: self.Size.Height To: self.Height.Width -1

    When collides with otherObject
    --Change Attribute: growMe To: 0

    You can also get it to grow and shrink automatically:

    When self.Size.Height > 100
    --Change Attribute: growMe To: 0

    When self.Size.Height < 50
    --Change Attribute: growMe To: 1
  • jadjad Member Posts: 135
    ###################################
    #when "ANY" conditions are valid #
    # #
    #self.motion.linearvelocity.x = "0" #
    #self.motion.linearvelocity.y = "0" #
    # #
    # change attribute "move" to "1" #
    # #
    # otherwise change attribute "move" to "0" #
    ###################################

    # ###########################
    # #
    #"ALL" conditions are valid #
    # #
    #actor.motion.linearvelocity.x = 0 #
    #actor.motion.linearvelocity.y =0 #
    # #
    #change attribute "grow" to 1 #
    #############################

    #############################
    #attribute "grow" = 1 #
    # #
    #change size growth rate "x" #
    # #
    #otherwise #
    #change size growth rate = "0" #
    #############################

    ############################################# *rule inside a rule
    # when "ALL" conditions are valid #
    # #
    # atribute "move" = "0" #
    #############################################
    #when "ANY" conditions are valid #
    # #
    #actor receives event overlaps with actor of type "x" #
    #actor receives event overlaps with actor of type "y" #
    # etc...etc... #
    # #
    # change attribute "grow" to "0" #
    ############################################

    I dont know if this is what you're talking about, but I hope it helps...
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hmm. Still not working, is there a way you can make me a template?

    Thanks!
  • SnapFireSnapFire Member Posts: 361
    I know this is a stupid question and not the right place to put it it but...
    How do I make a template?
    I have looked but can't figure it out. I'm sure one of you could answer it in about 3 seconds lol.

    Thx

    -Thomas
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hey Tshirt,

    Thank you for taking time to make this demo, but the link isn't working. :)
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Interesting, Im away from home so ill try it again when I get home.

    And yes I know, it won't work on an iPhone, I do have my Mac with me ;)

    Bray
Sign In or Register to comment.