itzathis's Forum Posts

  • 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 : ).

    : )

  • Try Construct 3

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

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

  • This really depends on how you design your game.

    Also, it depends from how you resize the game, most people use Letterbox scale, I used it too but with experience, I've found that Scale outer works better, and publishers prefer it.

    Letterbox scale tries to fit on your screen and leaves black boxes to fill remaining area.

    Scale outer tries to fit on your screen and shows more layout instead of black boxes.

    I've prepared some comparison for you:

    I created a new project, set the background colour to be red, and filled the screen with one, cyan sprite.

    The window size is set to be the resolution of iPhone 5.

    Check how this looks with using different scale modes:

    Letterbox - http://screencloud.net/v/779o

    Scale outer - http://screencloud.net/v/aIV1

    You can't overcome the black boxes in letterbox, however you can fill the layout area outside the viewport with some background and no red area will be shown.

    Read about aspect ratios, if you create a game for 320x480 it will work perfectly on any resolution which is a multiplication of those values. So if you create a game in iPhone resolution (320x480) it will work well on iPhone 4 because it has a resolution of 640x960, divide those by 2 and you'll have 320x480 resolution.

    So, you can use iPhone5 resolution to scale it down, but then you will need to pick one of the scale modes and act accordingly to it's consequences.

    Read more: https://www.scirra.com/tutorials/73/sup ... reen-sizes

  • Unfortunately I don't understand your problem. I've opened the capx and black boxes DO find path and move for the star.

    Maybe you think about something more like this?

    Also try to use Pin behaviour with Bar/Rope style of following.

    Basically when each new box is spawned, pin it to the first box in the line and the rest should follow it.

  • Btw, you dont have to create variables for toggle_sound etc. You can use Audio object to check those kind of things like "Is silent", "toggle silent" etc : )