Need a good trigger for this

VolontaArtsVolontaArts Member Posts: 510
hey everyone. thanks to GS members ive progressed a lot in my game i think. and special thanks to kevincross who solved a problem for me.

But yea everythings running smoothly and the way i want it. just this trigger i have that i dont think is going to work lol. here is a video

the trigger is when the red block collides with the floor/or other block....spawn another block. but then this occurs



so if anyone can think of another way to trigger my spawn block rule it would be awesome.

things ive tried that didnt work (when block.velocity=0 spawn block) ive also tried a timer but it wouldnt work because this game depends on the players speed. so the player could take it slow or fast.


thanks for your time everyone

Comments

  • VolontaArtsVolontaArts Member Posts: 510
    edited September 2013
    anyone?
  • LumpAppsLumpApps Member Posts: 2,881
    It looks to me as if the blocks keep spawning. Don't you need to stop them spawning? Or is the end of the video not illustrating your problem and am I missing what's wrong?
    If you want to stop them from spawning when the box is full you can use a rule that only spawns when y < screen height.
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    I think triggering when an actor can't move no more is fine, you just need a rule to stop triggering when an actor stops at a certain point I.e. the top.

    This might be something easily controlled if you have a table with the number of columns and rows for your gems, and store the position of each gem in the table, like a grid. Think of the table like a connect 4 game/rack. Before you spawn a new gem you could check the top row in your table (row 1) and make sure there's no gem in any of those columns.

    I think a table should be easier to check if any of the same gems are next to each other and combine or destroy them depending on your final game idea.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    The block velocity 0 could still work for you but sometimes it's just not zero. Since it's a real variable it can be .0023 or some such thing. Try when linear velocity Y is less than 1.
  • VolontaArtsVolontaArts Member Posts: 510
    @ludwigheijden i like you idea... its not what i wanted but it gave me and idea, but the game will be over when you reach that height, but i want to give the players a chance to be that high and still be able to fight to stay alive, but the blocks spawning when they collide happens so fast it doesnt allow it. thank you tho you gave me many ideas!
  • VolontaArtsVolontaArts Member Posts: 510
    I think triggering when an actor can't move no more is fine, you just need a rule to stop triggering when an actor stops at a certain point I.e. the top.

    This might be something easily controlled if you have a table with the number of columns and rows for your gems, and store the position of each gem in the table, like a grid. Think of the table like a connect 4 game/rack. Before you spawn a new gem you could check the top row in your table (row 1) and make sure there's no gem in any of those columns.

    I think a table should be easier to check if any of the same gems are next to each other and combine or destroy them depending on your final game idea.
    u just blew my mind lol, but i would have to really look deep into that because although understand what your saying, i do not know how to do but i will start testing to find out, b4 finding GS wonderful program i was trying to learn programming with karel the robot lol. and one thing i learned to do was for him to check whats to his left and to his right and above and below. i was wondering how i would do that with this and u just answered that. thanks again kevin.


    @fryingbaconstudios velocity did not work because what you dont see offscreen is a actor sitting on top spawning these red cubes. and i believe the second they are spawned they are at 0 because they all just start spawning on top of each other as soon as the game starts...but you gave me a very interesting answer ;)) thank you all...
Sign In or Register to comment.