Soul3's Forum Posts

  • This is awesome! Bless you for sharing this

    ^_^

  • what I do is put objects in a family, and then use "On family touched" and "Pick Top Instance"

    That's clever! I will give it a try, thanks :)

  • construct.net/en/make-games/addons/353/touch-plus

    :)

    Cool! I will give it a try, Thanks :)

  • You can't block the area from touching, but you can add another condition:

    > On object touched Red
    Is not touching Green
    

    Thanks a lot :)

  • Hello,

    I have two sprites Green and Red. Green is on top.

    When I click on the overlapping area, I don't want red to trigger the On Tap/Click event.

    How can I make Red "touchable" only in the areas not hidden behind Green?

    Thanks :)

    Tagged:

  • OK, I tried changing the CSS sheet of the exported HTML5, and it worked. But have no idea if that would work when exporting to Android.

    Tried executing this using the browser plug-in:

    document.styleSheets[0].addRule('#sliderID', '-webkit-appearance: none');
    document.styleSheets[0].addRule('#sliderID::-webkit-slider-thumb', '-webkit-appearance: none');
    document.styleSheets[0].addRule('#sliderID::-webkit-slider-thumb', 'background: #FF0000');
    

    It worked when I tried it in a sample html page. Didn't work in editor. As apk, when the code executes the slider disappears all together!

    Ended up making my own slider! Pinning a circle sprite (with DragDrop) to a bar sprite (rope style).

  • Try Construct 3

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

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

    I need to change the thumb of the Sliderbar, but I can't access it.

    .slider {
     -webkit-appearance: none;
     width: 100%;
     height: 15px;
     border-radius: 5px;
     background: #d3d3d3;
     outline: none;
     opacity: 0.7;
     -webkit-transition: .2s;
     transition: opacity .2s;
    }
    
    .slider::-webkit-slider-thumb {
     -webkit-appearance: none;
     appearance: none;
     width: 25px;
     height: 25px;
     border-radius: 50%;
     background: #FF0000;
     cursor: pointer;
    }
    

    The CSS code above can access ".slider" and ".slider::-webkit-slider-thumb". I can access the first one directly using the Sliderbar->Set CSS Style action. How can I access the second one (::-webkit-slider-thumb)?

    I have to use C2 runtime, and can't use Browser->Load Stylesheet ..

    Thanks!

    Tagged:

  • Thanks for taking the time to clarify :)

  • Thank you :)

    I experimented a little and tried to set it from client side instead by setting the AJAX Request header. I tried setting "Cache-Control" to "no-cache" or "no-store", but the AJAX ON Complete never triggers.

    Should I add something to the server as well? i.e. client header only is not enough?

  • Hello,

    I am making a game that gets data from a server. I use AJAX to get it and read it.

    After I edit the file on the server, it takes a few minutes for the game (in browser) to read it (I re-run the project after a few minutes). After exporting to Android, it didn't read the updated file until I cleared the cache manually from the Settings.

    It kept reading the old version until the cache was cleared.

    How to fix this, please?

    Thanks :)

    Tagged:

  • My working solution (for iOS or Android):

    + Set Orientations in Properties to Any

    + Add Browser-Plugin

    + Add Action on game start: Browser -> Lock Orientation to ... (what you need)

    + Done!

    You can change the orientations at runtime.

    EDIT: You don't need this Plugin:

    https://www.construct.net/en/make-games/addons/311/cordova-screenlock-c3-runtime

    .. but you can use it instead of the browser plugin.

    Thank you.

    The plugin worked great! Is there a C2-compatible version, please?

    The browser method is what I have been doing from the start. I tried it again and it didn't work on Android.

  • If you need to temporary switch orientation to show something simple (like a splashcreen), you can fake it - rotate all graphics on the layout or the layout itself by 90 degrees.

    Thank you. Unfortunately, this section is a bit complex to use this method :\</p>

  • Hello

    I want to switch the game from Landscape to portrait at specific moments.

    Choosing "Any" in project properties will allow the user to change orientation however he wants. Choosing "Portrait"/"Landscape" will lock the app to this orientation forever.

    I want to control orientation from the game.

    I have tried almost all combinations of the Browser:Lock/Unlock orientation, but always the above result.

    The game is exported as Android or iOS.

  • Well, how nice! I was missing around and found TileMap:Load from URI. Using a couple of png files, I could change the tilemap frames.

  • Animating tiles sounds nice. Your method looks clever as well, I didn't know you could that!

    Let's hope Construct would support animating tiles in the future; e.g. letting us use frames in the tilemap editor. Otherwise, all our solutions will remain "hacky", in a way.

    Let's say you are going to animate multiple tiles every frame, instead of replacing each tile, wouldn't it be easier to build a JSON string for the whole map in each frame, and use it to replace the whole map every frame?

    Example: TMjsonFrame[0], TMjsonFrame[1],...TMjsonFrame[X] (built at Layout start or hardcoded during design)

    Every Tick: Tilemap = TMjsonFrame[N]; N=(N+1) mod (X+1);

    Also, I think scripting is worth a try, maybe it has easier access to the internals of the tilemap.

    Oh, and speaking of tilemap forloops, here is a suggestion that will make them less painful. It has been 3 years already and still "No status" :'(

    construct3.ideas.aha.io/ideas/C3-I-351