Colonel Justice's Recent Forum Activity

  • Can you try to substitute the text objects with spritefonts and see if there is a difference in behavior?

    Looks like a canvas overlay type of thing.

  • You can use system expressions and check TextInput.Text for occurences.

    Let TextInput.Text be "cool guy :D"

    Option 1)

    find(Text,Find) will find you a string inside another string.

    So find(TextInput.Text,";") should return -1.

    Option 2)

    The system expression tokencount will return the number of tokens in a string

    tokencount(TextInput.Text,";") should return 0.

    Option 3)

    The system expression tokenat returns the Nth token from a string, hence -1 if no occurence.

    tokenat(TextInput.Text,";") should therefore return -1.

    If one of the methods matches its condition, clear Textinput

  • Can you share an example file?

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

Colonel Justice's avatar

Colonel Justice

Member since 16 Mar, 2011

Twitter
Colonel Justice has 10 followers

Trophy Case

  • 13-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies