megatronx's Forum Posts

  • haha I think I need to learn to wait couple of days before replaying to your posts xDD

    Gladly my replay still applies... this time anyway:D

    Yeah lol . but don't wait 2 days XD

  • This seams right - from json point of view - because you are saving everything about this sprite and then load it up.

    But from editor point I would say it's a bug, Two objects can't have same Z value. After creating new object it should automatically assign next available Z value - even if you set Z from other source it should not set already existing Z value.

    ... As always - edited first post while you were writing XD haha!

  • Hi,

    Ashley

    Don't suppose It's a bug, so I'm posting it here.

    Just discover issue with object asjson and z-ordering. Basically here's the scenario:

    I have an object I want to "duplicate" . On clicking on it, its data is being stored asJson in webstorage, then same object is being spawned, and it is being set from Json string. But both are being given same z-ordering! This makes picking "top/bottom" impossible.

    Edit@ I've found a fix for that. But it's a really unnecessary hustle. In the future, could setting object from json automatically check if object with same z-ordering exists already, and if it does new z-order would be applied?

    [attachment=0:19lyttul][/attachment:19lyttul]

  • This is not exactly related, as it is related to this post , but will post here anyway.

    I found an issue with z-ordering when loading object from ajax. Basically it is given same Z-order as the other object. So I have 2 or more instances with z-order = 0, so picking the top or bottom one doesn't work. And If I add "Move to top of the layer" the original object just vanishes!

  • I found an issue with z-ordering when loading object from ajax. Basically it is given same Z-order as the other object. So I have 2 or more instances with z-order = 0, so picking the top or bottom one doesn't work. And If I add "Move to top of the layer" the original object just vanishes!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, that's quite interesting. This seems to be caused by the fact that you're using the object->spawn action as opposed to system->create. Spawn seems to specifically pick the current instance as the spawner, rather than the spawnee. Create picks the spawnee as the current instance.

    With Create, I would have to specify the coordinates, so I choose spawn.

  • Setting up the parameters of an object in the same event in which it's created definitely does work, but you have to be in exactly the same event or a sub-event. If you're trying to do it in a parallel event (if the creation and parameter defining actions are both separate sub-events of another event), then Construct will reset the picking and default to all instances of the object. Picking is always reset as soon as you step up and out of an event.

    It was within same event.

    [attachment=0:1pymzmh4][/attachment:1pymzmh4]

  • You do realize that spawn means use the parents parameters?

    My goal is to exactly duplicate the object, with it's size, angle etc. For that, i'm storing it as json. Otherwise, the object spawned is not a carbon copy.

  • Just out of curiosity what parameters are you trying to apply to the new objects? I'm using some thing similar for my "auto-scrolling" game in which I'm creating a bunch of objects(of the same type) applying an animation frame randomly and dealing with the results properly in the game logic.

    I'm trying to duplicate object as Copy/paste. Using "on created" did work thought.

  • Yo,

    Writing here cause getting a headache with picking objects. I'm having an issue with picking top object on mouse hover when two or more objects of the same instance are overlapping each other. Atm, if I hover the object underneath first, and then move cursor over the one above it, the one behind it is still selected and I want the top one to get selected instead. I'm attaching an image. Red dot is a mouse cursor.

    [attachment=0:tbtrsvxe][/attachment:tbtrsvxe]

    and events

    [attachment=1:tbtrsvxe][/attachment:tbtrsvxe]

    Any suggestions how to deal with that?

    Thanks

  • >

    > > Have you tried setting the parameters when using the "On Created" event?

    > >

    > > That should work like a "Constructor" and apply to only the freshly created object.

    > >

    > > If you're using some system objects or functions and not re-picking though, I could see that potentially causing some issues.

    > >

    >

    > Hmm. I missed that one! Thanks for pointing that out. >.>

    >

    you can also add the events just under the creation itself, it should work

    This unfortunately didn't work.

  • Have you tried setting the parameters when using the "On Created" event?

    That should work like a "Constructor" and apply to only the freshly created object.

    If you're using some system objects or functions and not re-picking though, I could see that potentially causing some issues.

    Hmm. I missed that one! Thanks for pointing that out. >.>

  • Hello,

    I would like to suggest having more expression fields for "Create" and "Spawn" object. Atm I'm trying to set parameters to newly spawned object from clicking on the same type of object, but parameters I'm trying to set are being applied to first object and not the newly spawned one. If we could have more parameters for those actions, we could set the object from json, or set size, angle, animation frame etc. within them, and without the headaches.

    Cheers

    M

  • > Or you could copy the text object in to Canvas plugin by R0j, and then invert its width.

    >

    Almost sounds good! But I think it might still require you to write the translations weirdly. And flipping the glyphs/symbols individually after importing them into the SpriteFont would be a pain.

    It's really confusing to think about.

    I was suggesting to copy whole text object, not individual fonts. But maybe sprite fonts don't work the same as text object? Didn't know that.

  • I love making game menus! I don't think I hate anything in terms of creating or implementing (Though I'm terrible with sound/music creation, I do think it's fun to work with!). I hate it when there's a problem in your events but you just can't seem to figure it out and begin to think it's a bug but you continue to check and then eventually realise it's the most obvious thing ever, like a slight misspelling, and volia!, you fix it. I mean it's satisfying to fix the problem, but it really gets annoying when you spend over an hour at a random problem when you want to work on more important things

    I think this should have been posted in the Open Topic section, could lead to some interesting discussion!

    Same, hate my own bugs.

    Also, programming is the least fun thing in game development for me. The best part is designing the game itself, and making game systems, story and characters, music and sound. I'm not best at graphics unfortunately. I can do all right images, but not great ( unless it's very stylized and not very realistic ).