newt's Forum Posts

  • That's not how code works. That's not how open source works.

    You could at best mimic the features of the game mechanics.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well I should have said the asJson. The save state wouldn't really work in a lot of situations.

    Actually I got to thinking about it, and Spriter would be interesting to try for this.

    It at least has a few of the same features.

  • Maybe add a delimiter and parse it that way.

    Maybe better with that method would be the save state. A little bloated, but you would be able to get things like instance variables saved.

  • Not really that's the way angles work in games. Your options are a larger resolution, or not using the angles that don't alias well.

    Edit: or frames, pre rendered animations.

  • Thanks, thats a lot cleaner.

    Still the use of the Json object is not that intuitive to me.

    I mean no matter what you're going to have to slap some strings together.

    Seems like nesting an array shouldn't require the extra steps.

  • At runtime you create an event that runs every tick where you set the object that doesn't have the fade to have the same opacity as the one that does.

    If you have multiples of linked pairs, then you will have to pick part of the container in the condition.

  • Using an alternate method...

    * On function 'jsonstart'

    ----+ System: For each Sprite

    -----> JSON: Set "sprite."&loopindex&".xy.0" to Sprite.X

    -----> JSON: Set "sprite."&loopindex&".xy.1" to Sprite.Y

    Using the resulting json

    + AJAX: On "load" completed

    -> JSON: Parse JSON string AJAX.LastData

    ----+ JSON: For each entry in "sprite"

    -----> System: Create object Sprite on layer 0 at (JSON.Get("sprite."&JSON.CurrentKey&".xy.0"), JSON.Get("sprite."&JSON.CurrentKey&".xy.1"))

    This seems pretty convoluted for the inexperienced

    Also loopindex would be nice to have for the json loop.

    Saving, and loading arrays of objects should be much easier imo.

    Gui's, composite sprites etc are a basic necessity.

  • Ok apparently set array "sprite.xy" is overwriting itself.

    I can't push on the back of array "sprite" a new array of "xy" because I can't create one there without naming it something else.

    I can read a json with an array nested, the "books" demo for example, but I can't write one.

    Ashley what do I do?

  • Thanks, but what I need to do is

    * On function 'jsonstart'

    -> JSON: Set "sprite" to array size 0

    ----+ System: For each Sprite

    -----> JSON: Set "sprite.xy" to array size 0

    -----> JSON: Push back Sprite.X to "sprite.xy"

    -----> JSON: Push back Sprite.Y to "sprite.xy"

    That should allow me to use the for each in json

    But that's not working.

  • The grid, and of course the collision polygon for each tile. The texture, the size of the object, and its position are all editable. I don't think you can use different textures per instance, however you can refer to instances by their index.

  • You can maybe use "set from json", or just make a second Tilemap object.

  • I want to make a json with the coordinates of a bunch of instances.

    Basically "for each" instance set the value at key to array of the x, and y.

    I can do this easy with a csv of the values, but I'm fairly new to json, and could use some help on setting that up.

    Thanks.

    Tagged:

    Subscribe to Construct videos now
  • You could try:

    On collision bullet set angle of motion to angle of motion + random(-10,10)

    And yet you're still here.