paladin's Recent Forum Activity

  • Perhaps you should be using multiple layouts then. I added 1,000 zone sprites on launch and it didn't make a significant difference to memory usage.

  • It would be easiest to have 2 dimensional arrays, where your x axis is each list of words and your y axis is the words themselves. If this comes from a text box from the user's input, you will have to parse these using the tokencount and tokenat expressions. I have put together an example app for you, which works according to your explanation however -- https://mega.nz/#!CtNDFDjb!FyfDEm50qRNCSg-dyf1_OqFi3cg4SNBlYIFoiymg4yg

    result --

  • I sorted it out for you and included notes in the .capx where I made the changes - https://mega.nz/#!2wkzBJAC!PwT0WTWyaJ8fIIIaFd9HyZumPJzsNgAE0dAVM2G-WUA

    Good luck with your project. BTW, you can get free sound effects from here - https://www.freesound.org/browse/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not sure if it's possible to change in the editor. I guess you could hack it in with jQuery, though I found it easier to edit the plugin itself. Note that the 'datetime' type didn't work for some reason (not sure if it's lack of support or what), but the 'date' type did, so I added that.

    You can download it here --

    https://mega.nz/#!698DXZaJ!XkB-ZUXCLVqQu0v3D9zbdgbLmthRN5CgfsOAMXklvsU

    Put it in Construct 2\exporters\html5\plugins

    Add the updated 'Textbox 2' object to your layout, and change the Type in the properties window to 'date'. I tested it on chrome and android and it seems to work on both.

    EDIT: according to this, DateTime only works in Safari --

    http://www.w3schools.com/jsref/dom_obj_datetime.asp

    So i updated the extension to also include the 'time' type - so you can just use 2 separate text boxes (new link above).

  • After playing with the tutorial while using the debugger, it doesn't seem like the zone sprites have an impact on memory usage. In the tutorial, it sits at 4.5MB regardless of their presence.

  • Regardless of whether you encode the level data or not, the triggers for achievements will be able to be modified, if your server side app blindly trusts what the client reports.

    Disclaimers aside, you could use the CBHash plugin to do this - https://www.scirra.com/forum/plugin-cb-hash-md5-sha-1-and-sha-256_t62215

  • if you try somethig simple ..you will see that loopindex don't wait.. so call & compare loopNumber in loop..

    That did the trick. Interestingly, if I added to the counter before the wait, all of the cards had the max value of the loop... whereas placing it after it worked as expected.

    Thanks for your help guys

  • I'm making a Texas Hold 'Em style Poker game. I'm having difficulty with a function which is called from inside a loop, whose intended role is to make the cards to deal to the players. When I pass loopindex to the function as a parameter, and use that parameter to set an object's variable (one created in the function), it ends up being erroneous (-1).

    Here's the loop and function from the event sheet with arrows pointing to the relevant bits --

    And this is the debugger showing the created cards' unexpected cardNumber variable (the one derived from the loopindex) --

  • I finally managed to solve this by using the 'Else' condition. I had tried it before but wasn't using it correctly. Here is the fixed project if anyone would like to learn from my mistake

    https://mega.nz/#!KtF12RRQ!cSEwTnprGAEd7tkT8s5mzYFlnmGBirsUpG9Abupkcog

  • I'm making an inventory system where you can click on items (a sprite with the animation set to denote the item type) to select them, then click on a tile in the inventory to place them there. I'm running into trouble with two events which are for adding an item to the inventory and removing them from it, where they both trigger at the same time.

    You can download my project here. I've left a comment above the aforementioned events.

    https://mega.nz/#!awFCBZqI!2NcsbOfLjJQ9_CrJ-d177j6RTgfzCRs9Z3UBo8J8i8M

    Sprite & Sprite2 are for troubleshooting - they indicate that both events are being triggered simultaneously & the pepe is the item placeholder.

    Any idea how I can make this work?

  • Edit 2: Solved. The text box was too small to display the result for the diagonal values, as these had more digits than could be displayed in the size of the box.

    I'm trying to find the distance between two pathfinding nodes. I use the expression

    distance(distance(Sprite.Pathfinding.NodeXAt(loopindex), Sprite.Pathfinding.NodeYAt(loopindex), Sprite.Pathfinding.NodeXAt(loopindex - 1), Sprite.Pathfinding.NodeYAt(loopindex - 1))[/code:2a4cmomz] in the tutorial as an example, which produces this result: [img="http://i.imgur.com/GlatZSf.png"]
    As you can see, the nodes which are horizontal and vertical from each other show the distance, however those that aren't don't. I tried using this just to test it out [code:2a4cmomz]distance(0,0,100,100)[/code:2a4cmomz] which doesn't work and [code:2a4cmomz]distance(0,0,0,100)[/code:2a4cmomz] which does.
    
    Is this a limitation of the expression or am I doing it wrong? I could calculate it myself but this seems quicker.
    
    Thanks  
    
    Edit: the same thing happens when I try to calculate it, using the expression [code:2a4cmomz]sqrt((sprite.Pathfinding.NodeXAt(loopindex - 1) - sprite.Pathfinding.NodeXAt(loopindex)) ^ 2 + (sprite.Pathfinding.NodeYAt(loopindex - 1) - sprite.Pathfinding.NodeYAt(loopindex )) ^ 2)[/code:2a4cmomz]
    [ul]
    	[li]which works when I calculate it myself with given x and y coordinates, so i'm sure i'm doing something wrong here.[/li]
    [/ul]
  • I am making a tool to show a map (a sprite), which the user can drag around with their mouse and zoom in and out of. When the user zooms in and out by using the mouse wheel, I increase / decrease the scale of the sprite in the event sheet. This looks nice and works well, however the point of origin of the sprite isn't relative to the 'view' (sorry i don't know the terminology yet), which means that when you zoom in and out, the point you were looking at moves out of view.

    I would like to change the 'origin' image point of the sprite in the event sheet when the user zoom in / out to be relative the middle of the 'view' in order to make this look right, but i can't seem to find the option. Is this possible?

paladin's avatar

paladin

Member since 25 Mar, 2015

None one is following paladin yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies