silkc2's Forum Posts

  • Can I have the math for doing this manually since I'm using a number and not an angle?

  • Hi guys

    I've noticed that "every n seconds" and "Time = x Seconds" conditions seem to be worked out based on the time the entire game has been loaded rather than the current layout.

    Is there any way to get a time for the current layout?

    Reason I ask is that I am making an interactive tutorial which needs to wait a couple of seconds after loading before showing page 1 (otherwise I pick up a certain touch event in some cases which loads page 2 with the player never seeing page 1).

  • Hi - Gonna res this thread because I'm getting a bit lost without named parameters.

    How about a compromise? Let us set a note when we create a new function, where we can key in a description of what we want the parameters to be.

    Then function call can show this note - if it detects one was set for the function name you key in.

    I've kind of tried to do this with comments, but my functions are sat in one sheet and it is niggly to toggle between where I am to remind myself of what I need to do.

    Also whilst I'm here, is there no way to make function call detect if the function name is invalid? Or even bring a drop down of the function names you are using?

  • Not sure on how they got lost, have done nothing abnormal. It's happened recently, because the game had sound the last time I tested.. so I guess r126 lost the files somehow (or it could even be a dropbox issue, I'll try to repeat it).

    I had an older version backed up which has got all the sounds so I'll try repair it, thanks for the info.

  • Link to .capx file (required!):

    Private dropbox link sent to supportsjm@scirra.com

    (Webber.capx)

    Steps to reproduce:

    1. Load the capx

    2.

    3.

    Observed result:

    Error followed by crash

    ---------------------------

    Construct 2 Check failure

    ---------------------------

    Check failure! This is probably a bug:

    Project file missing on disk

    Condition: FileExists(last_path.c_str())

    File: Projects\ProjectFile.cpp

    Line: 23

    Function: __cdecl ProjectFile::ProjectFile(class FileFolder &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,const class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &)

    Build: release 127 (64-bit) checked

    Component: Construct 2 IDE

    (Last Win32 error: 3)

    You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.

    ---------------------------

    Abort   Retry   Ignore   

    ---------------------------

    Operating system & service pack:

    Win7 64bit

    Construct 2 version:

    r127

    (have gone back to r126 for now)

  • Aha smashing! Is that a relatively new addition or have I been blind all this time?

  • Hiya

    I am creating a level based game. I don't want to clone the (rather complex) interaction/touch events into each level's event sheet because that would mean I have to maintain code in many places going forwards - a logistical nightmare as any coder knows.

    ..Nor do I want each level to share one event sheet as it just isn't practical due to different game modes, tutorials, and different objects and backdrops to handle as the levels progress.

    Is there any way at all that I can have some code be re-usable in all event sheets? I already have the code in question grouped up into an "interaction" group.

  • I didn't realise it would assume those one is paired (and that it wouldn't align it like it does all the others).. oops!

    I found that creating them at runtime eliminates the problem anyway.

    Thanks. :)

  • Hi all!

    See here for sample:

    dl.dropboxusercontent.com/u/116137178/Help/HelpmeWithtextContainers.capx

    I am trying to get text boxes to automatically have a solid / patterned background. From what I've read about containers they should be perfect for this, and from playing around with origins and setting z order I'm almost there - but the background doesn't appear at all for the first text box.

    Any idea why this would be?

    Should I be using pin instead of containers anyway?

  • Any joy?

  • What, how to declare a variable or the logic you could use around one?

    Just right click event sheet, add global variable.

    It's then global to all event sheets, not just the one you create it on.

    So with that in mind.. one way to make it work..

    Curr level layout start - assign global variable to "Layout1"

    On victory load "you win" layout

    On "you win" layout, check the global variable (system>compare variable). If it is "layout1" then load "Layout2". If it is "Layout2" then load "Layout3" and so on.

    If you are using numbered layouts as above, you can massively cut down on the events by storing level number, adding 1 to it, and concatenating your new name then use System>Load Layout by name.

    e.g.

    1, My layouts are called "MyLevelX" where X = level number

    2, I load level 2. My global "LevelNo"is set to 2. I beat level 2.

    3, In my "victory" layout I load the next layout by name simply as "Mylevel" & LevelNo+1 (which makes a string "MyLevel3" in this case).

  • I wonder the same things.. especially about copyright.. anyone?

  • OK thanks very much, just trying to get a full understanding. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well even if it isn't a loop same question stands;

    Create an object in event 20

    Handle creation in event 100

    Does c2 jump down and up?

    Conversely:

    Create an object in event 100

    Handle creation in event 10

    Does c2 jump up then down? ;)

    I guess simply put are the created/destroyed events independent of event ordering..?

  • Hiya

    I am just curious to know when exactly does "On Created" get called?

    For example if you have Event#10 looping around and spawning objects, and those objects have an "On Created" much further down say event #100. What happens? Does it "jump" to event 100 then back to 10 (the loop) per created item?