PapitoMyKing's Forum Posts

  • Hi,

    Is it only me, but since 2 updates ago, minifying the script when exporting to web takes 10 times more than before. Any ideas?

    Thanks!

  • Yes thanks for the info - I will hopefully be playing next time you are streaming!!

    You're welcome.

    I'm not the streamer btw, I made the game for him.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • LaurenceBedford Hey, I took as a template a twitch integration that is around the forums, don't remember who made it, with you connect with websockets to twitch. Then, you listen for the commands:

    IF (Websocket.lastmessage == "!play" && username not already entered)

    Create chicken

    Set chicken.id to the username who sent the message

    Push the username to an array, so one person can't enter twice

    Then, if you want the user to controls its chicken, you pick by comparision, and pick the one with the name of the username, and do what you want to do :)

  • Hi,

    I made a frogger clone for a streamer, and you control it from the chat, I was inspired by the twitch plays games I've seen over the years:

    Subscribe to Construct videos now

    One of the most fun projects I've worked on :)

  • So, I'm receiving the text from a twitch chat into C3, but when I want to perform an action based on the letter I got, the if statement breaks and doesn't go through. I'm triple checking for it, for example, when I get the "a" letter, (I console.log, debug view and on-screen text), but it just doesn't passes the if statement. What am I doing wrong?

    Also, I tried with a number and a global number variable, I check for a 1 for example, and it does passes with a number, so there is an issue with checking for strings.

    Tagged:

  • Thanks! Works now.

  • Hi,

    So,I want to connect to the twitch api, and I need to set a request header, like this per their documentation:

    dev.twitch.tv/docs/authentication

    curl -H "Authorization: OAuth <access token>"

    And in Construct I try this:

    And this:

    But always get a "missing authorization token" message. Any Ideas what am I doing wrong?

    Tagged:

  • Hi everyone,

    I'm looking for someone to make a C3 example game (fully commented), with twitch integration to the newest api, the C3 game being able to be played from the twitch chat (like pokemon twitch plays), the game reacting to events like bits, donations, suscriptions, voting, etc., and the game sending messages to the chat ("level 1 cleared"). Full integration. Please send me a pm or add me on discord with your quote:

    PapitoMyKing#8268

    Cheers!

  • YOU ARE AN ABSOLUTE GENIUS!

    Thanks, it is working, now I'm going to integrate the token into the gameplay...

  • Thanks for the suggestions, but I get the same "not constructor" error. I know there are other libraries for ethereum besides web3, I will try those, really want to make this work.

  • I have no idea why my post was deleted... maybe the forums are bugged.

    So, I moved the web3 file to the project files folder, and keep my main js file in the scripts folder. I wrote this:

    runOnStartup(async runtime =>
    
    {
    
    runtime.assets.loadScripts("web3.min.js");
    
    // This code runs on startup with
    
    // the 'runtime' variable available
    
    });
    
    web3 = new web3(new web3.providers.HttpProvider("http://localhost:7545"));

    But still get the "web3 is not a constructor" error... sigh

  • I want to make a game, where at the end of the level I count how many coins the player has grabbed, and then mint that number of my custom token and award them to the player. I know there are security issues (a player might hack the game and spawn as many coins he wants, or modify the variable, but I'll tackle one issue at a time).

    Turning off worker mode fixed the load script issue. But when I try to use web3 on my custom js script, I get the error:

    "ReferenceError: web3 is not defined"

    This is the line:

    web3 = new web3(new web3.providers.HttpProvider("http://localhost:7545"));
    

    Both scripts are inside the "Scripts" folder, which I have understood are loaded automatically and the start.

    I've been a Construct user for years, but this is my first time using js inside C3, thanks for the help!

  • This is possible in Phaser, but would love to be able to do this in C3 instead.

  • To use ethereum, I need the web3 library, I import it and put it under the "Scripts" folder, but when I start the game I get the error:

    "Failed to load project script 'web3.min.js'. Check all your JavaScript code has valid syntax."

    Any ideas what can I do? Is it even possible what I'm trying?

    Thanks

    Tagged:

  • Bad scirra, bad!

    Please remove the text that exclaims C2 supports exporting to mac. You are doing false publicity.

    Do I look like I have a windows machine and a mac machine in my home network?

    No, I can't just move to C3 because of custom plugins/behaviours.

    Now I look like an ass to my client: "Sure, the game will run on a mac, construct will export it".