klkitchens's Forum Posts

  • Thanks both... got it figured out with your help!

  • I must be brain dead but cannot figure this out...

    When something scores points, I want a bubble/cloud/points to appear in that spot, float a little upward, then fade out. I have the images I want, just cannot figure out how to get that to work.

    Create a copy of the object

    Move it to the right layer

    Set it to the right x,y position...

    then what to make it sorta animate upward for a second or two, then disappear... bullet?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, just create a new global variable for each layer and layout?

    Sorry, no...

    Create one global variable. When you create your layout (or load it), create a new copy of the button and set its on/off value to whatever the global variable is. When you change to an existing layout, update the copy of the button there to the same value.

    When it's time to play sounds, you don't check the button, you check the value in the global.

  • Create a global variable IsMuted and when it's set on any layout, it sets the global variable... and then all your code to play sounds/music whatever includes the condition IsMuted = false (or 0), then play the audio.

    Nevermind... you're looking for the actual control, not the effect.

    Can't you just create a new copy of the control on the current layout when it's loaded and then copy the settings from the original on or store them globals?

  • Can we have a screenshot of the concerned events then?

    Also:

    "System - Pick Eggs by evaluating Eggs.UID = GameFunctions.Param(0)

    System - Pick Basket by evaluating Basket.UID = Eggs.BasketUID"

    you can do :

    Eggs - Pick by Unique ID : GameFunction.Param(0)

    Basket - Pick by Unique ID : Eggs.BasketID

    Solved it... the method was getting called just fine, but it was not finding the Basket (I was checking my own variable incorrectly) so it resulted in nothing getting fired thus the error.

    To debug, I reduced the event to a basic call with no params, then slowly added pieces back in... and voila...realized my mistake.

    THANKS!

  • Good tip... and yep, it's in the same event sheet. And I confirmed the spelling was the same too...

  • I've got my main code working and now I want to work on some end-game scoring functions, so needless to say I don't want to have to "play" the game each time I want to test/tweak something. So I added a button to the layout for debugging purposes that basically "solves" the whole game for me (placing eggs in their respective baskets) so I can get right to scoring animations, etc...

    The button is called "FIllCorrect" and I have the following code:

    Conditions:

    FillCorrect - On Clicked

    System - Pick All Eggs

    System - For Each Egg

    Action:

    GameFunctions - Call "DEBUG_PlaceEggInBasket (Egg.UID)"

    which calls...

    Conditions:

    GameFunctions - On "DEBUG_PlaceEggInBasket"

    System - Pick Eggs by evaluating Eggs.UID = GameFunctions.Param(0)

    System - Pick Basket by evaluating Basket.UID = Eggs.BasketUID

    Actions:

    GameFunctions - Call "Egg_SelectEgg" (Eggs.UID)

    GameFunctions - Call "Egg_PlaceInBasket" (Eggs.UID, Basket.UID)

    GameFunctions - Call "Egg_DeselectCurrentEgg"(Eggs.UID)

    (these three functions are working, they are functions called when the user actually manually places the eggs, etc..., I'm just calling them (or trying to) automatically)

    The problem is I'm getting this message:

    "[Construct 2] Function object: called function 'DEBUG_PlaceEggInBasket', but no event was triggered. Is the function call spelt incorrectly or no longer used?"

  • Best tip I could give is learn what %, or modulo does.

    Already know what that does... not sure that answer was much help. Thanks to the others however who pointed me to values to actually get the time.

  • Excellent. Thanks!

  • Part of my scoring is based on the time it takes to do a level. I want to be able to capture the time they started, the time they ended and then find the difference between the two.

    Is this possible in native Construct or are there any libraries or plugins I can use for this purpose?

    I could increment a counter every "tick" I guess to keep up with that, but didn't want to add that per tick workload to the game if I didn't need to.

    The score requires you to complete a challenge in a single sitting. If you switch apps, you "fault" and no score is recorded though you can come back and finish, you just won't be scored.

    Any help would be most appreciated. I've set aside my Construct project for too long and want to get this market (tying up these loose ends) ASAP! :)

  • Since what you're doing is not common and not recommended, you'd have to go the long route. Copy the Layout, create a new event page, and then copy the code from the old event page to the new one manually.

    There is probably a better way to do what you want however.

  • Dig through the forums and you'll find quite a few threads (many resolved bug threads) where users on Steam are unable to get Construct 2 to start up. Usually, a new update or switching from the stable release to the beta or vice versa will fix the problem. But given how often these issues are cropping up, it seems to me there must be a core problem that's going unresolved. Scirra has said it's an issue with the Steam launcher, and that's likely, since I gather these problems don't happen in the release downloaded from Scirra. But it seems to me it's in everyone's interest (Steam, Scirra, the users) to get something like this fixed.

    I suppose maybe I'm just frustrated and trying to vent, or maybe hoping that bringing it up more generally will get someone to take it seriously, but I also want to know who else has experienced this problem and if it's as common as it seems. If you work on Steam--especially if you use it regularly and update with every beta version--have you ever had a problem getting the application to start?

    Not to be contrary... I own the Steam version and have NEVER (never) had a problem launching it or using it.

  • Well, I would guess the goal would be to have one event sheet that controls both layouts -- that way you don't have to duplicate all that code.

    I may create a smaller version of my main layout, but all the same components will be there and I want it to function the exact same way, so I would only want one event sheet.

    If I make changes to the events, they would work in both layouts. COOL!

  • Thanks!

  • So while it's not natively exported to Ejecta like CocoonJS (those devs are IN their cocoons it seems), can someone who has gone from C2 project to Ejecta share the steps (for quasi-dummies) on how this is done?

    It would be greatly appreciated.