Blowing Fan in a game help

steeler0038steeler0038 Member Posts: 153
edited November -1 in Working with GS (Mac)
Ok, so i have this fan in my game. and i want the player to be blown away by this fan when he steps in front of it. But, this fan will be rotating, so im trying to make it so when the fan is on its backside, that it will blow the player up when he is above the fan. does anyone have a suggestion on how i could set this up?

Thanks in advance

Comments

  • dazzlemedazzleme Member Posts: 152
    Here's how I do a wind blowing effect:

    Create an actor with no image attached to it - maybe call it "wind".

    In your actor that is going to get blown around by the wind, create a rule like this:

    ---------------
    When all conditions are valid: Actor receives event: overalls or collides with actor of type: "wind".
    Accelerate
    Direction: 190 Relative to scene
    Acceleration: 400

    Otherwise:
    When all conditions are valid: Actor receives event: overalls or collides with actor of type: "wind".
    Accelerate
    Direction: 0 Relative to scene
    Acceleration: 400

    Otherwise:
    When all conditions are valid: Actor receives event: overalls or collides with actor of type: "wind".
    Accelerate
    Direction: 90 Relative to scene
    Acceleration: 400
    ---------------

    The above will blow your actor the the left, right, and up, respectively. Then place the actors in your scene around the fan. The actors won't be seen since an image isn't attached to the actor.

    Perhaps there's a better way of doing this, but that's how I'd implement. The only downside that I'd love to figure out, but haven't yet, is your actor will get blown around every time he overlaps with the invisible actor, regardless of whether the fan is pointing in that direction or not. Maybe associating some sort of timer or attribute would solve that.

    Anyway, I hope this'll get you at least going in the right direction (no pun intended). ;)
  • steeler0038steeler0038 Member Posts: 153
    thanks dazzleme! this really helps :)
Sign In or Register to comment.