jumping actor

RiffelRiffel Member Posts: 1,272
edited November -1 in Working with GS (Mac)
I try hard but cant acomplish...
when my main character aproaches a foe, the foe must star jumping.
I do a rule
Yini=position y
when actor near foe, change atribute jump to true
when jump is true interpolate Y to Yini+100
when y = yni+100 interpolate Y to Yini

all works ok, but the foe jump one time. the jump atribute dont back to false

any help?

Comments

  • hrsmediahrsmedia Member Posts: 522
    Maybe add when actor collides with floor, change attribute to false.
  • RiffelRiffel Member Posts: 1,272
    may be, theres no floor realy, it just decoration.
    thanks hrsmedia
  • HachikoHachiko Member Posts: 330
    or when Y = Yini, jump is false. if jump is false, when actor is near bla bla, jump.
    Or you can just have an accellerate behavior for the foe, simulating gravity. Then, when player is near foe, if foe collide with ground, set motion Y foe to "number". this way it will jump, and after touching the ground, it will jump again. No need for boolean or interpolate.
  • HachikoHachiko Member Posts: 330
    If there's no ground, just tell if Yposition is less or equal to an Y of your choice.
  • RiffelRiffel Member Posts: 1,272
    my game dont use phisics, i dont wana turn it on, tried this technic but other features starts going crazy...
    i dont know why the jump atribute dont return to false... i think it was a bug thing, and restart GS and after the computer...
    do the Y < Yini and dont work.
    seens when the main actor get close, then its start the jump if main character go away then works, theres some realtion with the proximity.
    but i try make it jumping alone, independet of main charater like in loop, dont work... :-(
  • RiffelRiffel Member Posts: 1,272
    search for project with sample do download, but not find it.
    some one knows about?
Sign In or Register to comment.