Asmodean's Forum Posts

  • My solution:

    with index=4, newCharacter="0", string= string to change.

    system | set string to left(string,index-1)&newCharacter&right(string,len(String)-index)

  • Trigger once isn't really necessary here. It prevents that this event is tested every tick. If the velocity is for example 'greater than 0', this event is triggered once and the action will be executed. Only if the velocity changed back from another value 'greater than 0' to 'greater than 0', it will be triggered again. Otherwise it will be ignored. The same for 'less than 0'.

    Those both events will work the same without trigger once, but will be tested every tick. So it's a teeny tiny bit performance save. You also don't need the else ,but is there for the same reason.

    From the manual:

    Trigger once while true

    Turn an ordinary event (which is tested every tick) in to a trigger. For example, if an event plays a sound when lives equals 0, normally this event runs every tick. This plays about 60 sounds a second and would sound pretty bad. Adding Trigger once while true after the other conditions makes the event run just once when it first becomes true. This makes the previous example only play a sound once the first time your lives reaches 0. It must be the last condition in an event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try:

    + Pig: Physics Y velocity < 0

    + System: Trigger once

    -> Pig: Disable Physics collisions with Box1

    + System: Else

    + Pig: Physics Y velocity ≥ 0

    + System: Trigger once

    -> Pig: Enable Physics collisions with Box1

    You could also put any platform with jump-thru in a family and use the family instead of Box1.

    Example:

    drive.google.com/uc

  • It doesn't work because that are word wraps (soft breaks), not newlines (hardbreaks). Word wraps are not in a string that is a formatting feature of the software

    which shows the string.

    There is a workaround. Try

    floor(Text.TextHeight/(Text.FaceSize+round(Text.FaceSize/3)))

    TextHeight: the real height of the text in the textbox (in pixel).

    FaceSize: Font size (in pixel).

    Problem is, you have free space between the text lines, my guess was 1/3 of the font size. but this could vary (size , font itself). No clue if this always correct.

  • Works for me.

    Can you post a screenshot or capx?

  • You could try inliner I've tested it with a very small project and it seems to work.

    github.com/remy/inliner

  • He's not trolling. Construct has Typecasting. It will automatically convert from one type to another.

    If you set a number variable with a string you will get the number. if the string is a number, otherwise you get NaN (Not a Number). In a text variable you can store what ever you want.

    Number variables are always float. Int is the same as floor you need this only if you want no decimals.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • It should be this one:

    drive.google.com/uc