[Suggestion]More expression fields for "Create" actions

0 favourites
  • 14 posts
From the Asset Store
A very simple to set up ZElevation based depth of field system for your game. Fully commented.
  • 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

  • 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.

  • 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. >.>

  • > 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

  • >

    > > 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.

  • 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.

  • 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.

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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]

  • 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.

    Here's an example of the two different events in action.

  • 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.

  • 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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)