Dalal's Recent Forum Activity

  • I think you need one more layer of logic. Let's replicate the mechanics of a button. Think of your button as having two states: 'down' and 'up'. When a player is overlapping your button, you want the button to be 'down'. When a player is NOT overlapping your button, you want the button to be 'up'. Let's put these mechanics in event form: add a Boolean instance variable to your button called "isDown". When Player1 or Player2 is overlapping Button, set isDown to True. If neither is overlapping, set isDown to False.

    Now we have a button that is either in a down state or up state (behind the scenes), depending on whether a player is standing on it. You want to link up your StartLava events to the state of your button. Basically, when the button is pushed (i.e isDown first becomes True), we want to toggle StartLava (set StartLava to 1-StartLava). To do this, we can use the "Trigger Once" condition. Our logic will look something like this: Button.isDown is True and Trigger Once, set StartLava to 1-StartLava.

    Now, every time isDown changes to True from False, StartLava will toggle. If a player steps on the button (changing isDown to True), and another player steps on it later (keeping isDown as True), because there was no change in button state, StartLava will remain the same, as you would like it to.

    EDIT: Or a simpler but conceptually similar approach would be: When either Player 1 or Player 2 is overlapping the button, in a Trigger Once SUBEVENT, toggle your StartLava variable.

    This should work similarly.

  • I don't think you even need to Pick, just do "Sprite: Fail = 1". That will automatically run if at least one sprite has its Fail set to 1.

  • To my knowledge, there is no native "Create Object" action that lets you spawn using a name, which is what you'd need to implement it the way you want.

    However, I did come across this plugin by rexrainbow, that might help you:

    I've never used it, so I don't know, but essentially if you can get the nickname of the Family instance, and then Create object by that Nickname, you'd have what you need.

  • I get it, but I have several identical objects in the scene. The amount of scenarios would be pre-established.

    Would have a way of following the player to create the level, I return to the menu without losing one layout?

    If all your puzzle objects are identical, then it makes it even easier. The same concept applies. You want to get your data into an Array, and then save it as JSON text. In your case, you can use WebStorage and set a local value where the key = "Level [X]", and the value = [JSON data]. In the end, you'll have three local values saved, one for each level. When you want to load a given level: simply fetch the data using the respective key, load from JSON into an array, and then loop through the array to fetch the position values, and set your objects' positions accordingly.

    Note that if you're not used to using Arrays, it might be worth getting some extra help. If you don't like this approach, I would explore the current built-in Save functionality that C2 provides (as procrastinator mentioned), but I don't know much about it, and I believe you mentioned that the built-in Save does not work for you.

  • If you want to make your own save system, you'll probably need to look into Arrays.

    Basically, for each puzzle object that you want to save, you'll need to store the object's name/identifier (e.g "Ball"), its x-position, and its y-position. For Each loops will be handy here. You'll want to go through each object, and push its data into the array. Once your array is filled with the correct data, you can save the array data as JSON (that's your "save"). Later, when it comes time to "load" the level, you can load that JSON into an array, then use the imported data to recreate the objects in their saved configuration, using the identifiers to figure out which type of object to create, and the X and Y positions to figure out where to place that object in the world.

    That's the basic approach I would take, but there may be a simpler "built-in" approach I am not aware of. If you are not comfortable implementing this idea on your own, I would suggest posting the .capx here so people can help you.

  • Awesome! Thank you!

  • Thanks for the reply!

    I agree with all your points, but there's a possibility here that I just found out. There is something called a DBA (or doing-business-as) name. Perhaps it would be appropriate to register a DBA name without the LLC, then I can safely show it as the company name in the app store - and the seller name would still be my full legal name with the LLC.

    Ugh, it's all a bit confusing. But I think you're right, that users don't really care too much. It's more from a branding standpoint. Like how Scirra would rather display their name as Scirra in trailers and all, rather than Scirra Ltd. It would be Construct 2 by Scirra, not Construct 2 by Scirra Ltd. The former looks and sounds better.

  • Once you've populated the arrays with JSON, why not loop through each array element and set it to something like replace(Array.At(loopindex),NEWLINE_SHORTCODE,newline), where NEWLINE_SHORTCODE is the custom shortcode you created to designate a newline? And add all such arrays to a family to do it with one event.

    NOTE: I haven't tested this, just throwing ideas out there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you'll get more answers if you explain IN DETAIL (at least a 100 words), what you want to do. If I asked you a question like: "How am I supposed to get to school?", what would you answer? You don't know what school I want to go to, what I do at the school (student or teacher), what city I live in, where I live, etc. Give us the full story and we can help. Also, it will help if you make your post title more than just "How do I". The post title is your opportunity to give details about your question. Consider something like: "Making a character run right always"... and then use the post to give more details.

  • Why not set time scale to 'SliderBar.value' every tick? One event, and easier to maintain.

  • Problem Description

    When the rate of a sound is altered throughout the course of its playback, the "Is Any Playing" and "Is Tag Playing" conditions of the Audio object return incorrect results; either 'true' while playback has stopped, or 'false' while playback is still in progress.

    Attach a Capx

    http://parthdalal.com/PitchBug.capx

    (it won't let me attach files to the post anymore)

    Description of Capx

    Click the 'Start Demonstration' button to play a sample with a continually changing playback rate. The text is supposed to reflect whether the audio is playing or not. You will observe that near the ending of the sound, the text will change at the incorrect time, either showing 'Not Playing' while its still playing, or 'Playing' after it has ended.

    Steps to Reproduce Bug

    • Step 1: Create an action that plays a sound.
    • Step 2: Follow with actions that change the sound's playback rate multiple times while it's playing (e.g high for a second, low for another).
    • Step 3: Create a condition that tests whether the sound is playing.
    • Step 4: Set a Text object to "Playing" when the sound is playing, and "Not Playing" when it isn't.

    Observed Result

    Text switches to "Not Playing" before the sound has completed, or it remains "Playing" even after the sound has completed.

    Expected Result

    Text should accurately reflect whether the sound is playing or not.

    Affected Browsers

    • Chrome: YES
    • Firefox: YES
    • All Others: Not Sure

    Operating System and Service Pack

    Windows 7 Home Premium SP 1

    Construct 2 Version ID

    r200.

  • So I found this on the Apple developer website:

    [quote:307rxtxf]If you have enrolled in the Apple Developer Program as a company, you can specify what you want to use as your company name. In the store, the “company name” is used prominently for navigation and to group your apps. Your legal entity name appears as the “seller” of your apps.

    From: https://developer.apple.com/library/ios ... Steps.html

    It explains some of what I'm seeing. But I'm still pretty unsure whether I should go through with this LLC. If anyone has any more advice to offer, I'd really appreciate it. Has anyone else enrolled in the dev programs as a company?

Dalal's avatar

Dalal

Member since 17 May, 2012

None one is following Dalal yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies