how to make wind?

diegocsdiegocs Member Posts: 531
edited November -1 in Working with GS (Mac)
hw can i simulate wind with a swipe of a finger? it's a vital of future of my game

Comments

  • POMPOM Member Posts: 2,599
    @diegocs
    I don't know exactly what are you asking for? Do you want your actor to fly right/left once you make the swipe ? Please explain.
  • diegocsdiegocs Member Posts: 531
    lets say that there are actors falling cause of gravity and as i swipe my finger on the screen i simulate wind in the given driection, which moves the falling objects
  • POMPOM Member Posts: 2,599
    Ok so this is what I would do:
    Make an invisible actor 480 320 and place it on the screen so it covers the whole scene.
    Make a game attribute called "wind" - integer
    Make a rule in the actor :
    When touch is pressed change self.pressed to game.touch.X
    change self.released to game.touch.X

    Then another rule:
    When touch is release change self.released to game.touch.X

    Then:
    If self.pressed > self.released (means you swiped left)
    Change game.wind to 1

    If self.pressed < self.released (means you swiped right)
    Change game.wind to 2

    AND THEN:
    In your player make a rule:
    When attribute game.wind = 1
    Accelerate left

    When attribute game.wind = 2
    Accelerate right.

    Hope it helps sorry for my English..
  • diegocsdiegocs Member Posts: 531
    thanks, for the help

    pd: where are you from? is ther a way can contact you if i need help?
  • POMPOM Member Posts: 2,599
    I'm from Israel ;)

    But you can ask any question in this topic and I'll do my best to help.
    And if I wouldn't know the answer , someone will !
    Don't hesitate to ask for help. That is why the forum is here!
    Roy.
  • quantumsheepquantumsheep Member Posts: 8,188
    Kids today, eh? Six posts, and no mention of beans.

    I weep for the future...

    ;)

    QS :D
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I was waiting and waiting, QS; knew you'd post eventually! (I was tempted; I would have mentioned curry!).
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    quantumsheep said:
    Kids today, eh? Six posts, and no mention of beans.

    I weep for the future...

    ;)

    QS :D

    The only reason I opened this thread was to make a beans joke! should have known you would beat me to it!
  • quantumsheepquantumsheep Member Posts: 8,188
    @gyro and scitunes - Us old-timers have to keep things light, right? :D
    scitunes said:
    The only reason I opened this thread was to make a beans joke! should have known you would beat me to it!

    Great minds think alike!

    And so do ours!

    QS :D
  • SingleSparqSingleSparq Member Posts: 1,339
    Took me 3 hours but just got the joke-ha!
  • POMPOM Member Posts: 2,599
    Ha?!?!?
Sign In or Register to comment.