oosyrag's Forum Posts

  • Does it work with hexidecimal color instead? [outline=#ffffff]

    Or try [stroke] text [/stroke]

    BBcode works within a string, so include it inside the quotations

  • construct.net/en/make-games/manuals/construct-3/tips-and-guides/performance-tips

    If you can isolate when and under what conditions it occurs, you'll be able to narrow it down more. It may also be a good idea to test on different browsers and devices.

  • You can add the available colors to an array, and delete the color out of the array after it is chosen. Use floor(random(array.width) to get a random array index

    You can also use the advanced random plugin to make a permutation table. A permutation table is a randomized list, so if you go through each index of the permutation table in order, you'll get nonrepeating random values.

  • Add the else condition to the second event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I believe it goes in the URL itself, although I'm not particularly familiar with the API. This is what I'm assuming from glancing over it -

    https://translation.googleapis.com/language/translate/v2?key=MYKEY
    

    Edit: sorry auto format cut the url

  • The key is included in the query parameters. cloud.google.com/translate/docs/reference/rest/v2/translate

    Otherwise, you'll need to be authenticated through OAuth 2.0.

    developers.google.com/identity/protocols/oauth2/javascript-implicit-flow

  • Does running

    var win = nw.Window.get();
    win.maximize();
    

    on start of layout work? I don't have the full version export to nw.js to try it.

  • Put the green block onto a family. For each green block, check if overlapping family at all four orthogonal positions. If it is, add 1 to a counter variable. If the counter variable is greater than 2, delete the green block.

    Of course, this changes if the next block you check might have had more 3 adjacent blocks before deletion, so you've got a game logic issue to solve even before implementation. If you place a block that results in two adjacent blocks needing to be deleted, which one gets deleted?

    You might be able to get around this by flagging the block with another instance variable instead of deleting it right away, then delete all flagged blocks at the end of the tick.

  • I haven't tried it, but try setting fullscreen: true in package.json, per stackoverflow.com/questions/71073474/how-do-i-make-my-nw-js-application-start-in-fullscreen

  • It doesn't so much have to do with line of sight as states. Your home should not block los. Use an instance variable to keep track of the player is hidden or not. Upon entering the home, check line of sight, if no los, set hidden to true. Otherwise, hidden is false. Enemy attack should be based on Los and hidden state.

  • If you've been using construct for 9 years and can't read that as conditions and actions, I can't help you. It's definitely not code in any sort of programming language.

  • + Mouse: On any click
    -> Sprite: Tween "" value from 1 to 0.5 in 1 seconds (Default, destroy: No, loop: No, ping pong: No, repeat count: 1)
    
    + Sprite: Is Tween "" playing
    -> System: Set layout scale to Sprite.Tween.Value("")
    
  • Try using the tween (value) behavior on a helper object, where start value is your current scale and end value is your target scale.

    While tween is playing, set layout scale to object.tween.value.

  • To center between multiple sprites, you can just enable scroll to on all of them.

    For zooming, you can set layout scale.

  • Personally I think that if you were invested in making a pinball game(s), importing and using a physics library would be the cleanest way. It would be more work up front but it should mostly be a one time thing.

    Teleporting the physics simulation ball to a separate location is a nifty idea! That seems like it would work well, as long as the physics simulation doesn't get thrown off with a sudden change in position from manually moving the object.

    Also add suggestion to implement/update the physics object and just wait. Box2d collision filtering is a thing that exists after all, we just don't have access to it through the official plugin.

    I'm not very familiar with the addon scene but I'm a little surprised there isn't a third party addon that uses an alternate physics library already. I guess physics is probably one of the more complicated things to implement after all.