dop2000's Forum Posts

  • Not sure what happened, but loading PNG stopped working for me. When I click "Load" icon or choose "Import frames from files", then select PNG images - nothing happens. JPG images work fine.

    This seems to affect Chrome only.

    I see this error in the console log:

    projectResources.js:1775 TypeError: Cannot read property 'sg' of undefined
     at new e.SHc (projectResources.js:2027)
     at Function.d.l (main.js:291)
     at Function.h.Wb.vfb (projectResources.js:1874)
     at k.RHc.a4 (projectResources.js:1775)
    

    .

    SOLVED! "Enable experimental features" setting was causing this.

  • The best solution would be finding someone who could make an addon.

    If you want to do this with JS, you can try adding their script to the project, set its purpose to "Import for events". Then call its functions from the event sheet, for example showBanner()

    You may need to call onDeviceReady() function directly to initialize the API, I don't know if the event listener will work in C3 game.

    This will be difficult to test, because you'll have to build the app every time with this cordova plugin, it won't work in preview. If you are testing on Android, I suggest collecting logcat logs to check for console and error messages.

  • Is this a multiplayer game? If the dot speed depends on the display frequency, make sure to select "Framerate mode=V-Synced" in project properties.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hugone I doubt Eren would be able to help - this seems like a limitation of the JS library that I used, it's pretty basic. If you need a more advanced/accurate barcode reader, you'll have to use some other library.

  • Some of these addons (Board, Chess ect.) are pretty big and complex, I'm guessing the project heavily relies on them and will not work without them. Eren ported many of Rex's addons, you can check them here:

    github.com/erenertugrul/construct-plugins/tree/master/ported_plugins

    But if you can't find some of the addons, then you are out of luck.

  • So the question now is how to make the cyan square move framerate independent.

    Since TileMovement doesn't like being interrupted like this, I would probably remove this behavior and move the sprite (or just a pair of variables) with events. This way you can make sure it's framerate independent.

  • Not sure I understand your question. Event 7 will start after events 5 and 6 have finished.

    What will happen if for some placeholder Blue=Red? It will not be destroyed and this whole loop #2 will continue executing on every tick. You probably need to reset Blue and Red variables at the start of it.

  • You need to change HasMoved variable to 1 for the selected player in each turn. This will prevent it from being selected in the next turn.

    And after all players have moved and a new round begins - reset HasMoved to 0 for all players.

  • Same way - set Blue variable to Blue.pickedCount

    .

    If you have multiple placeholders and want to count their blue neighbors, then yes, you need to do this in For Each loop.

  • You can pick by distance:

    System Pick Blue By Evaluate distance(Placeholder.x, Placeholder.y, Blue.x, Blue.y)<20
    	Set blueVar to Blue.pickedCount
    

    Or add Line Of Sight behavior to the Placeholder, and pick tiles in its sight.

  • I don't understand what you mean. You add an event with the two conditions I posted above, this event will pick the player with the highest speed value, who hasn't moved yet. Then you can start the turn for this player - select its attack, spell etc.

  • i dont understand how loops work. I also dont understand what u meant by set turn order to loopindex.

    You absolutely need to study loops, arrays, dictionaries, functions, families and other basic concepts in C3 before starting a big project like this. It may take you a couple of days or event weeks, but will save you months of fruitless efforts in the future!

    In this case you can determine turn order even without loops. I assume you have 10 different sprites for players? You have to add them all into a family and define all instance variables on the family. You'll need "Speed" and "HasMoved" instance variables. On start of each turn pick players that haven't moved yet, and then pick the player with the highest speed among them.

    PlayersFamily HasMoved=0
    PlayersFamily Pick with highest Speed 
    

    That's it! You saved yourself 12999 events!

  • No problem! By the way, you can make the rotation smoother with this expression:

    Set angle to anglelerp(self.angle, Gamepad.Axis(0,0), dt*10)

  • In Gamepad properties (on the left panel) check Analog Deadzone setting.

  • Possible, but not with particles. Add a sprite with Bullet behavior.

    Repeat 360 times 
    	Create Sprite
    	Set sprite angle to loopindex