jeffige's Recent Forum Activity

  • randomly

    Ok, try and follow, i hope to explain this right.

    Globals: RedboxCount=0, BlueboxCount=0, GreenboxCount=0

    On the start of the layout there are 30 or so Redboxes, 1/3 of that is blue, 1/3 of that are green (math may be off- just as an example)

    Redbox destroyed > add 1 to RedboxCount

    RedboxCount = random (3,6)

    (SubEvent) every random (2,6) secs

    (Sub) trigger once > create Bluebox

    BlueBox on destroyed > subtract 2 from RedboxCount

    Add 1 to BlueBoxCount

    BlueBoxCount = random (4,8)

    (Sub) every random (4,7) secs

    (Sub) trigger once > create Greenbox

    Greenbox on destroyed > subtract 2.1 from BlueBoxCount

    This may not be the easiest (not too good with variables, functions... All the hard stuff, but it works.

    I watched for maybe 5-6 mins, Bluebox and Greenbox had different number of instances created, respectively.

    My only big problem is trying to create a random number of each box randomly across the layout on Start of Layout. So it can be different each time.

  • randomly

    Thanks for the reply. I did end up using a variable.

    Redcount=0

    On Red destroyed > add 1 to Redcount

    Redcount=20 --

    random (2,5) sec > create blue box

    Blue box on destroyed > reset Redcount

    Works good. Now i just need to figure out how to create a random number of those blue boxes during the time the 1st blue box is created and then destroyed (which is around 3 secs before the Global Variable Redcount resets).

    Thanks for the reply, again.

  • I may have over looked a post on this subject.

    I would like to create 1 Blue box for every 20 Red Boxes created.

    I tried the 'for every' expression but i may be using it wrong.

    If anyone could share some help it would be greatly appreciated.

  • DerpyDev

    I'm sure an addon isn't needed. It's probably more a question of getting the logic right.

    Someone smarter and more experienced than myself.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This may take more than a few events to get this affect. Can you try...

    Player > is overlapping object - (add floor object)

    (Add condition(s) to test if there are any more objects the player can walk on- if not, do not add the condition) - 'action' > play "walk animation"

    Keyboard > on key pressed (jump) - player > play "jump animation"

    If that does not work, you could trying adding groups...

    Group > controls

    Add your movement actions here...i.e - move player logic --- Move 2.5 pixels forward and Set animation "Walk".

    Apple Physic force (0,325) and set animation "Jump".

    Sub-group > walk animation (only add - on right key pressed > play "walk animation" events/actions

    Sub-group > jump animation (only add - on key pressed > play "jump animation" events/actions

    Then, still in that 'controls group' but under the sub-groups add...

    On key pressed > jump

    Condition > player overlapping floor object (invert) disable sub-group > walk animation

    I may try and test this later, once i get back to my laptop.

  • You should upload a capx or at least a screenshot of your events...we'd be able to help more, and possibly find a solution quicker.

    Is an instance of the player already on that next layout?

    Is there an event 'create object' > player for that layout?

    You may get lots of questions here. As i said, better help will be available if folks can see your events, capx.

  • DerpyDev agreed!

    I worked on it for a few hours, decided to go a different route.

    If it's possible, and not that hard, to have an X axis scrolling background, there should be a way just as easy for a Y scrolling background.

    Maybe Ashley could share some of his wisdom here.

  • Been messing around with this for a few hours now. I've looked at infinite runner demo's, a lot of posts on the subject, and still can't figure out what i'm doing wrong.

    Layout/ Window size - 320, 480

    Tiled Background size - 320, 960

    I've changed the X to Y = didn't work.

    Changed the .Width to .Height = didn't work.

    Changed the - to + = didn't work.

    I've changed everything that i can think of, even flipping/ mirroring the background, still doesn't work. The tiled background has the same properties as the infinite runner demo.

    The only thing i can not do is change the - to + in the Tiled Background event = Y greater/equal -self.Height / 2. It gives me a syntax error.

    Any ideas?

    Help is greatly appreciated.

  • You shoul post the capx so we can see what you did. Or at least take a screenshot of your control events.

    Without seeing it...

    Touch > is touching object - Left sprite > simulate pressing left.

    Touch > is touching object - Right sprite > simulate pressing right.

  • see if these work for you...

    or this

  • In the infinite jumper demo the platforms are created randomly (layout width -20) and when they hit viewport bottom, and at a random Y spacing 8, 80 pixels apart.

    Wen the game starts > player jumping. He jumps up from the 1st platform he is on > add 100 to Score.

    But there are other platforms next to and underneath the player (greater than Player.X, Player.Y)

    Those platforms (greater than) do not get scored unless the player has landed on them or untill they are destroyed.

    I'd like the platforms that the player DOES NOT land on but that are greater than Player.Y to be counted also.

    So if there are 5 platforms 20 pixels apart in a line on the Y axis, if the player jumps on to the highest plaform, those other 4 below the player are not counted until they reach the bottom of the viewport and are destroyed.

    So there are 2 scoring modes- when the player lands on a platform, that platform and ALL others GREATER THAN Player.Y are scored, AND when the platforms are destroyed, they are scored also.

  • Sorry, not understanding when you say: "move the ball from"...

    Do you want the ball to move in the direction of swipe?

    You could try bullet and touch.X/ touch.Y

    Is touching - enable bullet.

    Is touching (inverted) bullet dissbled.

    You'll have to mess around with bullet behavior to get it right.

jeffige's avatar

jeffige

Member since 28 Oct, 2012

None one is following jeffige yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies