Please help me with this logic :(

jay2dxjay2dx Member Posts: 611
edited July 2014 in Working with GS (Mac)

Hi guys I've tried for about 3 hours to get this to work but I'm not good enough yet sadly,,

problem, :- i want to achieve the following,

Actor dodges falling platforms, they are spawned randomly: left and right, and only move when the user touches the screen, like the tile tapping game,

But there can only be left or right platforms, but I don't want a left to spawn after a right without there being a space between left and right spawns i.e. not left, right, left, right, I want it to be left, space, right, so the user is able to dodge through, think pole position etc.. at the moment I can't figure out how to tell the code if left spawn is true, either spawn nothing next or spawn another left!

any help would be great.. thanks,

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Very confusing question.

  • zweg25zweg25 Member Posts: 738

    Use a timer? After 1 second spawn another falling platform?

  • allc1865allc1865 Member, PRO Posts: 777

    That's a better idea @zweg25‌

    here's an updated template
    https://www.dropbox.com/s/u4tm2iunrvpiy9e/platformerTemp_2.zip

  • jay2dxjay2dx Member Posts: 611
    edited July 2014

    @zweg25 said:
    Use a timer? After 1 second spawn another falling platform?

    Thanks I'll try that, only I didn't initially, as I have it set to a grid and the spawn is triggered when an actor collides with another actor, when the screen is taped the actors move down one grid space, thanks again for the suggestions guys,

    Jay

  • jay2dxjay2dx Member Posts: 611
    edited July 2014

    @allc1865 said:
    That's a better idea zweg25‌

    here's an updated template
    https://www.dropbox.com/s/u4tm2iunrvpiy9e/platformerTemp_2.zip

    I'll check that out after work tonight, thank you, if only making games was my paid day job haha :)

    Jay

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @jay2dx You need to skip a line between the quoted text and your response. Otherwise, it looks like what you wrote was part of the quote. I've fixed the two posts directly above.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • jay2dxjay2dx Member Posts: 611
    edited July 2014

    Hi guys whats the best practice when spawning actors so that there are no miss spawns!

    i.e. tap the screen to spawn, actor is spawned and moves down its self size, and spawns an actor above, when this new actor moves down when touch is pressed it also spawns an actor above,

    what i have now is if you tap really fast sometimes it doesn't spawn an actor above!

    I have an self spawn to 1 when an event is triggered "i.e. a collision or self position is <1024" it spawns the actor above on "self spawn 1" and turns to self spawn to 0, and so on..

    any help would be great

    thanks jay..

Sign In or Register to comment.