Colonel Justice's Forum Posts

  • For 1:

    On start of layout:

    Repeat len(text) times:

    Create object "spaceblank" at (30 + loopindex * 32, 32) - you have to adjust the offset positions according to your layout and object sizes.

    For 2:

    The letter supposed to go there for each letter space is: mid(Text, spaceblank.IID, 1)

  • When importing sounds, there is a drop down list on the right upper corner of the popup window that allows you to change the bitrate. Default is 96 kbps. (R153)

  • You can play sounds and give them tags. Like this, you can also check if a sound with a given tag is playing or in your case, isn't playing.

    Like:

    -> On object clicked (or on drag start if it's drag & drop behavior)

    X Is "sound" playing (inverted condition, so is "sound" not playing)

    : Play "mysound" with tag "sound".

    Tip: you can invert conditions either with right click - > Invert or use the keyboard shortcut "i".

  • Not sure if I get the intended mechanics then... mind sharing a sample project?

  • You can also use choose("shoot1", "gun2", "firerocket_01")

    in case your sound files don't match a common nomenclature.

    Pro tip:

    Create a custom built-in function. "Play audio"

    Create some parameters e.g. soundname, posx, posy, volume

    On "play audio" : Audio: Play sample "soundname" at position "posx, "posy", volume: "volume"

    Then you can use the function in any point of your event sheets and have a common method to play sounds.

    E.g.

    -> On bullet collides with player: Call function "Play audio". soundname = choose("hit1","hit2"), posx = player.x, posy = player.y, volume = 0

  • Try:

    Every tick: System: Scroll to object (choose your player object)

  • Try to do the following:

    -> On object clicked

    Pick top object ( on the object's conditions) : Do stuff

  • Can you be a bit more specific?

    There is a built-in action on the Local Storage object "Clear local storage".

    Did you try to fire that and it doesn't work, or is it something else?

  • If I follow through your logic, your code behaves as expected.

    To clarify, let's keep track of a pseudo game time: 0 seconds (gt 0s) and indent the steps

    1) Sprite at 0,50 is created (gt 0s)

    2) Wait 2 seconds (gt 0s)

    3) Call function (gt 2s)

    4) Create object at 50,50 (gt 2s)

    5) Wait 2 seconds (gt 2s)

    6) Create object at 100,50 (gt 4s)

    7) Wait 2 seconds (gt 2s)

    8) Create object at 150,50 (gt 2s)

    9) Wait 2 seconds (gt 2s)

    10) Create object at 200,50 (gt 4s)

    Now let's check which objects get created at which "game time".

    gt 0s: object at 0,50

    gt 2s: object at 50,50 , object at 150,50

    gt 4s: object at 100,50 , object at 200,50

    Also ction 8) is fired immediately when the function is called.

    Construct runs the events sequentially through each event branch. As dop200 indicated, since 8) is not a sub-event and therefore will get fired right away, not caring about the wait in the action block above it.

  • You should not alter the layout's canvas size to do split screen.

    From the top of my head there are several ways to achieve splitscreen:

    1) Put each player's viewport on a separate layer, then sync objects and offset positions.

    2) Use n drawing canvases, then iterate through each player and paste that player's viewport to their canvas.

  • Can you try to open the c3p file with a zip program (like 7zip) and check its contents?

    If you can't, well you are in some bit of trouble there.

    Always remember to set up autosave targets to e.g. Google Drive and back up your project state every X minutes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use a dictionary.

    Key = Story name

    Value = Story content

    Dropdown menu: Key entries of dictionary

    On select dropdown item:

    Set storytextbox.text to dictionary.Get(dropdownitem)

    Set storyname.text to dropdown item

    Store the JSON string of the dictionary object to local storage, then load it whenever needed.

    Per se the dictionary object is global, so you can access it's content from any layout.

  • The question is somewhat ambiguous.

    1) If you mean in the animation editor, you can right click in the frames section and select "reverse frames". This will reverse the frame order of the animation.

    2) If you mean at runtime, I am most certain that there is no native way as negative animation speeds won't work (still frame).

    A possible, but tedious workaround is to copy the animation to be reversed, then reverse the frame order like explained in 1) and later, when exporting the project, make sure to select to deduplicate images. Like this you remove the identical images for both animation directions from the spritesheets and keep the file size and memory usage the same.

  • Please also consider using the Eren's port of the original Magicam plugin. Makes camera setup almost worry free. Check it out on Eren's github repository: https://github.com/erenertugrul/construct-plugins/tree/master/ported_plugins/plugins/magicam/dist

  • You can try to use the system expression "set object time scale" and override the global time scale.

    Furthermore, you can select the specific objects on a layer with the object condition "Is on layer" and then test for the according layer name or number.