Cannot manipulate object created in function

0 favourites
  • 4 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Link to .capx file (required!):

    Steps to reproduce:

    1. Generate object in function

    2. Choose newly created object as last event in function

    3. In that last event, manipulate new object

    Observed result:

    Objects spawn without being rotated

    Expected result:

    The new object is rotated

    Browsers affected:

    Chrome: yes

    Operating system & service pack:

    Windows 7

    Construct 2 version:


  • I wanted to post the same :)

    I really appreciate to know just if this is possible to be fixed to continue my project using function for this application

    I think its not a bug because you can avoid this just by a wait 0.01 sec ... a tick

    if you ccall a function for create or spawnn instance the new instance need one refresh to be modified

    thanks in advance

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is by design, a sort of known limitation. Created objects don't really exist until the next top-level event. You can use them in the same event, but not in later subevents. This is for stability reasons (the game can crash if objects are immediately created, due to the architecture of the engine). The workaround is to copy the initialisation actions in to each event that creates the object.

  • Ashley Ah, Ok. I was wondering if I'd have to go with that, it seemed rather inefficient but if it alternative is a less stable engine, I'll take inefficent! Thanks for the help

    egos that sounds like a good workaround, i'll give it a shot

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