Jaydon's Forum Posts

  • I personally have not used the plugin but I believe those parameters you mentioned can be any string ("text" with quotes). They are for your references to track.

  • You can try lerp 0.1 or lower to slow down the deceleration time.

    lerp(self.speed, normalSpd, 0.1)

    Just don't go too low like 0.0001. Fastest is 1 which is basically instant.

  • Assuming you're building solely for the web and not exporting it to a wrapper for iOS(Xcode) and Android (APK).

    You can use this plugin by : construct.net/en/make-games/addons/307/google-analytics-handy/documentation

    The documentation is here: imcsw.com/2019/07/15/handy-utilities-plugin as stated on the plugin page.

    You can use the if LocalStorage: On item "consent" exists, then set a global variable boolean to true, (make sure you created a global variable boolean on the event sheet). All actions that calls for a "send event" from the plugin must meet the condition of this boolean. This also applies to setting it true or false depending on which button the user click/tap, (Accept/decline).

    That way, if the boolean is false, which means the user declined to consent, the analytic event will not be sent.

  • to add timers like this to things i usually use a variable and then have an event that sets to variable to the time you want and an event that continuously removes time from that variable.

    for example: You make an instance variable on you player called "boosting"

    then for example

    When shift key pressed - set "boosting" to 0.5 (this gives you the amount of time you are after)

    then you link the action you are seeking to that variable being greater than 0. e.g.

    If player.boosting > 0 - set max speed to 100(or whatever u want)

    Inside this event you have a sub event that handles the countdown of the variable

    so sub event: -- every 0.1sec subtract 0.1 from player.boosting

    then finally you have an event that resets the action to normal when the counter has run down

    If player.boosting =<0 - set max speed to 50(or standard speed)

    Here is an example that i did for someone else of the same technique, that means that for 5 seconds after a player has overlapped the blood pool, they will produce bloody footsteps while moving. Same method.

    https://1drv.ms/u/s!AkmrWgxeuxlKhIcKKuFgyNMlgcROYw?e=EVX3Wd

    And also to add to this, you can also use the Timer behavior. When you dash, set timer with the tag "dash" and duration of the dash.

    If "dash" timer is running, set speed to dash speed.

    if "dash" timer NOT running, set speed to lerp() back to normal speed.

    You can also add that only if the "dash" timer is NOT running, you can hit "shift" to dash.

  • The simplest way is to use the local storage to remember if the consent is accepted AKA "Set item" & "check item exists" actions.

    For the pop up message, the simplest way is to have a new layer at the top. Give it a parallax 0,0 to make sure your message doesn't scroll or move around.

    Then just have your Text object, button object and Tiled background in that layer. Perhaps at the bottom of the screen (below anchor settings assumes this).

    Make sure you use the anchor behavior for all your objects in that layer if you're using "scale outer" for your fullscreen mode in project settings.

    Have your tiled background and text object set to Left edge: Viewport left, Top edge: Viewport bottom, Right edge: Viewport right, Bottom edge: None.

    Button object just be Left edge: Viewport right (assuming your accept button is on the right), Top edge: Viewport bottom.

    Once player hit the button, remember consented and set layer to invisible:

    + Touch: On touched Button

    -> LocalStorage: Set item "consent" to "true"

    -> System: Set layer "Pop-up" Invisible

    + System: On start of layout

    -> LocalStorage: Check item "consent" exists

    + LocalStorage: On item "consent" exists

    -> System: Set layer "Pop-up" Invisible

    we.tl/t-gpZs0Dhqdt [.c3p file]

    Also make sure you follow the guidelines and modify the example file for your needs.

    gdpr.eu/cookies

  • Try not to use wait like this as you can't really cancel the wait once it is running.

    The best way is to either use a boolean with a "state" to check if an actions is currently executing.

    Or another way is to use the Timer behavior. Use the timer as the "wait". Then on timer "tag" execute the actions. Also this way you could stop a particular time with the "tag".

  • I'm building a top-down game that has dynamic movement through multiple Z elevation. There are multiple lighting torches behind multiple Z platforms which the player transitions through.

    The issue that I'm getting is that the flashlight effect requires you to have the flashlight sprite on a different layer on top of my top-down platforms (according to the Simple Lighting Example in C3).

    I can't seem to have those torches behind some sprites as they are on a different layer on top. Basically all the torches just appears on top of everything even if their Z elevations are correctly positioned on multiple Z elevation platforms.

    Perhaps I'm missing some blend modes that I couldn't wrap my head around that works within a layer.

    This problem gets even complicated when there is a day-night system.

  • I have already replaced the moveTo behaviour with plain old built-in bullet behaviour (using distance travelled conditions with "distance()" & "angle()").

    And as for Lite Tween, I have found a good replacement:

    https://www.construct.net/my/make-games/addons/163/tweeen

    The issue now is that I can't add it to my project to replace Lite Tween because it requires you to be in C3 runtime! So, the only solution I can think of is to pain ass my way by opening a second window of C3 of my project and remove all of Lite Tween's ACEs. Then use my first window of C3 as a reference to where I have to add it back in. In theory this could work. Wish me luck!

  • The light blue/turquoise highlights are like lightsabers to my eyes

  • The texts throughout the forums and website have issues with word wrapping. Many times you find words that are chopped to next line.

  • I think you might only be able to go to a URL in a new window to open the browser. Otherwise I think you'll need to specifically whitelist every URL or origin you want to be able to navigate to in Cordova.

    Come to think of it, I'm not sure if such apps are actually allowed on the app stores. I think iOS in particular has restrictions on this. If it loads from the web then there's zero guarantee that what the app reviewers see is what will actually be in the app when it's published, so they may block that.

    I thought about using the "Add to Home screen" feature for my game on my android device. This way it would not have to go through the store. Unfortunately when I go offline, my game doesn't load and gives the offline dinosaur. What gives?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is there a list of C3 plug-ins currently available to test out? Maybe Kyatric could make a pinned post with a list of already available C3 plug-ins, aside from the request for conversion pinned post.

    Would love to lend my hand and test them out.

  • I'm not sure I understand. I was answering this:

    > Is it possible that my games be able to work like how C3 works using something like service worker?

    >

    This is already the case. C2 and C3 games already work offline using the same service worker the C3 editor uses. Of course making a Cordova app is another alternative to that. If you find a bug with that at any point, please just file a report as usual following all the guidelines.

    Tested the offline ability using Firefox and it definitely works as you mentioned! My current test is to see if I could have it offline on a Cordova App that only links the URL of the game. But I guess I need to have the Cordova app to even "go to URL" properly to test this.

  • C2 and C3 exported games already work offline. In fact, the C3 editor itself uses the same Service Worker developed for C2 games to run offline, which we recently introduced as the replacement for AppCache.

    In my recent test, the compiled APK using C3 does not "go to URL" using the browser object. I tried execute javacript such as

    "window.location.replace('...');"[/code:2fbojc19]
    
    and it didn't work either. Is this a security feature or am I missing something? I want to test if this app could load C3 games from my host and remember it offline.
  • Hear me out on this and tell me if there is a solution:

    Currently, web games can be displayed on... well, almost any device that connects to the internet with a browser. So, generally game developers like me would build a game that can be played on all these platforms because isn't that the feature of HTML5?

    Nice idea, but a lazy thought. Devices that can run HTML5 games as you know, does not necessarily have a touch input and vice versa. With that in mind, how would my games even fit the criteria as play everywhere right? Generally, if you could make a game that fits to be played on a touch screen, console and mouse+keyboard, usually turns out bad, inconsistent and poorly designed, or does not fully utilised a device's inputs.

    Let's say I made a game but I maintain separate project files for the big 3 (touch, controller, mouse+keyboard). Each of these variations have their unique design and game play that caters to its platforms. Now, I have exported them to HTML5 only. Then I host them online with a URL. Next, I made all kinds of necessary empty browser app that would load the URL for their respective platforms. All of which are now published to their respective stores (Play store, App store, XBox, etc).

    Sounds great right? My games have to be played online but my players will always get the latest version. So, here's my problem. No one loves games that require online connection if the game doesn't even need an online feature to work. Is it possible that my games be able to work like how C3 works using something like service worker? C3 can be used offline, at the same time it is also a web app. Can my HTML5 game created with C3 do that too?