dop2000's Forum Posts

  • You can set "Unbounded scrolling=Yes" and scroll outside of layout borders.

  • You can convert individual R,G and B channels into one number using rgb() expression, but as far as I know, there is no easy way to "extract" channels from the full rgb color. You can do this with these formulas:

    b=(color % 256)

    g=int(color/256) % 256

    r=int(color/65536)

    Also, check this plugin:

    construct.net/forum/construct-classic/completed-addons-40/plugin-bitwise-operations-41684

  • Lol, I know the feeling. I've been using C2 for almost 3 years and still discovering things like this.

    Most events in Construct pick instances. If at least 1 instance was picked, the event is considered to be true. If no instances were picked, then the event is false, and the "Else" condition is triggered.

  • Yeah, comparing count and picked count should work.

    Here is another way to check if all sprites have their variable set to 1:

    Sprite variable not equal to 1 -> (no actions here)
    Else -> (put your actions here)
    
    (else event will only be triggered if there are no instances with variable not equal to 1)
    
  • I don't think this is possible. The only solution is to keep the same value in a variable.

    EDIT: It's possible with scriping. For example, to get "Outline" effect parameter from an object by UID

    var i = runtime.getInstanceByUid(localVars.objUID);
    i.effects.forEach(function (e) {
    
    if (e.name=="Outline") {
     localVars.result = e.getParameter(localVars.parameterIndex);
    }
    });
    
    
  • Yeah, "pick all" event should should be nested under "path found" event, as it's done on sizcoz's screenshot above. I tried to show it in my first comment, but the new forum kills code formatting...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • No, just some number. You should probably randomly change the wind speed and direction every moment, and display it on the screen, so that players could adjust their aim.

  • Then use overlapping at offset (-windSpeed).

  • Can you post your capx, or a screenshot of the event sheet?

  • How do you test if the shot was successful? If enemy overlapping the center of the scope? Then use "overlapping at offset" instead, where offset is the wind speed. Say, if the wind is blowing to the right, you need to aim to the left of the target.

    I don't know how complex and realistic is your game. Does the distance to the target matter? Bullet speed?

    You should at least post a screenshot of your events!

  • 1. It would probably be easier and better for performance to create a function "ChangeDirection", which takes Player_Coll.UID as parameter. In this function you pick Player_Coll by UID, mirror/unmirror the body, update z-order for arms, change Sine magnitude etc.

    Every time a player changes direction, call this function.

    .

    I strongly suggest using a container. Container can only hold one instance of each object (one collision box, one body, one head etc.). So you can't put two arms in it. You'll have to make two identical sprites - LeftArm and RightArm. But this is a small price to pay for all the benefits you'll get.

  • You can use SpriteFont.TextHeight and SpriteFont.TextWidth expressions to get the exact size of the text, or calculate length using CharacterWidth, CharacterSpacing, CharacterScale. But this could be tricky if you don't want to break in the middle of a long word.

    So a much easier solution would be to break text manually. Just insert some special character where you want your breaks to be:

    "Oh... my god... I think that you ruined it...hzg@You are so irresponsible after all...hzg@now I'll have to do it by myself."

    Then use tokenat(text, 0, "@") to print the first part of text, tokenat(text, 1, "@") for second and so on.

    .

    For the typewriter effect search the forum or tutorials, there are plenty of examples. There is also a plugin by Rexrainbow.

    Also, check out this excellent dialog system (working link to capx is in comments):

    construct.net/forum/construct-2/how-do-i-18/zelda-dialogue-system-capx-and-117812

  • Add a boolean instance variable "pathIsFound" to this object. Add this event:

    Object On Path Found -> Object set pathIsFound to true
    
     System Pick all Object
    
     Object boolean pathIsFound is set
     ..System compare two values: Object.Count=Object.PickedCount -> Object move along path
    
  • I did something similar in my game, only I made separate files for each language: strings_en.json, strings_fr.json etc.

    Also, you can use Browser.Language to get user's language code.