itzathis's Recent Forum Activity

  • You can create a family and add those objects to it and for example call it Blink.

    Then add Flash behavior to the created family.

    Next, adjust the Flash behavior values.

    Now you can create an event with Keyboard plugin for example:

    On key K pressed : Blink->Start flash

  • About this I'm not entirely sure, I've used the version linked by Ashley in this tutorial:

    https://www.scirra.com/tutorials/992/ho ... ith-ejecta

  • 100% sure

  • Hello

    I've followed Ashley's tutorial about exporting C2 game to iOS using Ejecta + XCode and I'm encountering a little problem. I did every step and right after I open the xcodeproj file, it loads in XCode but with errors.

    Here's a screenshot: http://puu.sh/aFztf/b024ce4916.png

    Any idea what is happening?

    Thanks!

  • So basically my conclusion was right : ).

  • Hello!

    I've a quick question to ask you guys about the priority of events when using Event Sheets : )

    Let's say I have my Main Layout, and Main Layout uses Main Sheet.

    Now, I have another Event Sheet called ANOTHER.

    This is how the Main Sheet looks:

    This is how ANOTHER event sheet looks:

    My question is: how will the Score variable behave?

    In my opinion it should go:

    0 - initialization

    999 - Include: ANOTHER -> On start of layout

    0 - Main Sheet -> On start of layout

    Am I right? Will events from ANOTHER complete before events from Main sheet do?

  • Sure it's possible, + it's easy!

    All I had to do is:

    Add a global variable "PlaceACoin" - this variable randomizes if a platform should have a coin placed.

    Then I have modified platform spawn event to be like this:

    http://screencloud.net/v/nhft

    PS: I deleted the On start of the layout event as it worked the same way the event under it : ).

    : )

  • Okay, I deleted statements X Is on screen at platform and coin delete event, cause they are not needed(if the other condition is true, X is on screen has to be true so it doesn't matter).

    First lets fix the bug where coins appear after a while when the game starts so we actually can see them spawn.

    So what I'll do, is to create On start of layout + for each platform event and copy the create coin action.

    So this one is fixed, ok.

    Now, the problem you asked for, when we move up, we can see spawning the coins on newly created platforms. There are 2 problems with it. We spawn coins every 3 seconds, so if a platform spawns at time 0, a coin will appear after 3 seconds have passed, so delete this condition. Ok it seems to solve the problem, but I've mentioned 2 problems right? The other one is this:

    http://screencloud.net/v/FWW2

    Your code spawns the red platforms, so they are spawned at the top of the window and move down, but not above it like the blue platforms. To solve the problem you could move the creation point up a little bit so you can be sure the coins will always spawn on them outside the visible area : ).

    Sorry for the long reply but I didnt got a notification that you replied.

  • Since I don't understand your problem and what you try to achieve completely, I assume that you want every platform to spawn a single or some amount of coins, lets stick with a single one and being able to change that amount easily.

    I've added an instance variable to the Platform object to check how many coins have been added to it.

    And I've modified the loop to perform an action on each platform object which spawns a coin if Coins On Platform is less than an amount to spawn per platform.

    Also I've centred origin points for Object and Platform + I've deleted the transparency from their sprites.

    Also I fixed the formula for X and Y of coin spawn so it now shows properly : ).

    X = floor(random(Platform.X-Platform.Width/2+Object.Width/2,Platform.X+Platform.Width/2-Object.Width/2))

    Y = floor(Platform.Y-Platform.Height/2-Object.Height/2)

  • Try something like this:

    http://screencloud.net/v/nlgQ

  • You need to create a formula for it.

    System -> Spawn the x object at x layer with the x and y as below:

    (I assume you have your origin points at the centre of the platform and of the object.)

    X = floor(random(Platform.X-(Platform.Width+Object.Width)/2 , Platform.X+(Platform.Width+Object.Width)/2))

    This function randomizes a number between the edges of the platform on the x axis.

    Y = floor(Platform.Y+(Platform.Height+Object.Height)/2)

    This function places an object on the top of the platform.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try "Is touching x" and as an action just add two simulates for example: simulate platform pressing jump and simulate platform pressing right : ).

itzathis's avatar

itzathis

Member since 23 Dec, 2013

None one is following itzathis yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies