R0J0hound's Recent Forum Activity

  • I'm on my phone but would using mouse.x(layer) help? That should give a the mouse position on a layer. If you just use mouse.x it just uses the first layer which is the hud usually.

  • If you're using the physics behavior there is an expression for mass and X an y velocity which you can combine to get the speed with distance(0,0, vx, vy).

    If using another behavior then most have an expression for velocity or speed as well. Or if you'd like to calculate the speed with events you can if you keep track of the old position of the object.

    Every tick

    Set text to distance(Sprite.x,Sprite.y,oldx,oldy)/dt

    Set oldx to Sprite.x

    Set oldy to Sprite.y

    Outside of the physics or chipmunk behavior's an object has no mass so there's nothing to calculate.

  • If you're getting it from php I'm guessing you're using Ajax or something to get it. In which case you can just set the indexes of the array with Ajax.lastdata. No manipulating of the text required.

    My solution above is if you're typing the above json in directly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm guessing you're referring to when you can pick new objects.

    New object's do exist instantly, but here's info on what's happens with regard to picking new objects:

    It's basically do to how the object filtering works in the event system. The question is how to implement it better.

    Maybe having the ability to make lists of objects. It would be a bit tricky when dealing with destroyed objects though.

    I'd like to think the whole event system could be overhauled to be simpler and more powerful. I've been trying to come up with a design that addresses things like picking two separate instances and this toplevel thing in a simple way. Imo a good design is key before I make argument how I think things could be better. Maybe eventually I'll find that holy grail of perfect simple design.

  • Use the browser object to run some javascript to set a var to the json and access it that way or use yann's json plugin.

    The first step for either is to convert the text into a valid c2 string of text. Partially covered here:

    Let's use the browser object method. The first step it to convert that json text to both a valid C2 string of text and valid javascript.

    1. paste your json text in notepad

    2. replace ' with \'

    3. replace " with '

    That gives some valid text you can put in quotes and C2 will be happy with as input.

    Next use the browser object's execute javascript action to set a variable to the json.

    "window.myjson = {'Row':[{'id':'1','Item_Name':'Bushfly','Image_Path':'Monsters/Bushfly.png','Quantity':'1', 'Description':'It\'s a Monster.','Seller':'Mr. Garrison','Star_Cost':'1','Category':'Monster'},{'id':'2','Item_Name':'Jebbie','Image_Path':'Monsters/Jebbie.png','Quantity':'1', 'Description':'','Seller':'','Star_Cost':'1','Category':'Monster'}]}"[/code:1t778izg]
    That sets a global variable "myjson" to the json.
    
    Next use the browser.execJs() expression every time you want to access a value.
    browser.execJs("myjson.Row[1].Item_Name")
  • JSON's are just text and text can be stored in an array if that's what you're asking. If you get the text from a dictionary you can just store it in the array with the dictionary.asJSON expression. If you want to store the text directly you have to change all the " to "" or ' and then put quotes around the whole thing.

    Either of these are valid c2 strings of text:

    "{""c2dictionary"":true,""data"":{""id"":""1"",""Item_Name"":""BushFly"",""Image_Path"":""h.png"",""Quantity"":""1"",""Description"":""Monster"",""Seller"":""Garrison"",""Star_Cost"":""1"",""Category"":""Monster""}}"
    [/code:honoehc0]
    [code:honoehc0]"{'c2dictionary':true,'data':{'id':'1','Item_Name':'BushFly','Image_Path':'h.png','Quantity':'1','Description':'Monster','Seller':'Garrison','Star_Cost':'1','Category':'Monster'}}"
    [/code:honoehc0]
  • I was under the impression that in that case everything would stop while it loaded. At least it has every time I've used it.

  • This is by design. Instances of the same type all share the same animation images so if you load an image for one it changes that shared animation frame for all of them. The reason for this is memory efficiency.

    Now if you want each instance to be able to have a different image you can use a different plugin besides Sprite. There are third party versions of the Sprite plugin that does that. I think it was called uniqueSprite or something.

  • The best optimization is to only calculate the path once. You could even just use invisible sprites to make the path. The idea is to have the enemy check for an overlap with those sprites and set the angle of motion to be the same as that Sprite.

  • No worries, the concept intrigues me. That 2nd link covers a markup language using xml to customize everything with how tts pronounces stuff. Probably more that's needed but it looks idea. Unfortunately as I soon found out the standard html5 tts doesn't support it.

    The most I've found is a js lib that does tts and supports that markup language. The only issue is I find it sounds like garbage compared to most other engines.

    I didn't look but if there's a tts plugin for android export it may support that markup language. To use it should just be a matter of using the xml text when specifying what should be said.

  • delgado

    Set the iso sizes to half the object's size. That should do it in that case.

  • Found this security report here from 2011:

    http://arxiv.org/ftp/arxiv/papers/1112/1112.5760.pdf

    Which tells what that file is for chrome:

    [quote:2572s6z3]Web Data:

    SQLite file that contains Autocomplete form data in the autofill table; each

    record contains the form field name and its value

    Credit card data for e-payment Web forms in the credit_cards table

    SQL is a way to access a database file somewhere on your pc.

    So it's just for auto-complete, so unless you've used your game to get a credit card number before, the info isn't logged in that database.

    https://support.google.com/chrome/answer/142893?hl=en

    http://www.tomsguide.com/faq/id-1847774 ... hrome.html

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound