3d box - change Z on creation by name

This forum is currently in read-only mode.
From the Asset Store
Over 2700 files with all the colour combinations from a 15 colours palette!
  • Title says it all. Basically, I have the system object create a 3d box object by name, using a private variable of another object. However, I have no idea how to then select that object specifically so I can alter it's Z elevation.

    It's a small problem, and one I can work around with more events, but I'd rather not have to make new events for every time I make a different 3d box, I'd like to keep my event sheets small and manageable.

  • It should be that in the same event you create the object, it is automatically picked, so any events just after should apply to the new object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm aware that it will automatically pick the object, but let me explain my dilemma. The event 'pick by name' is used, which does not specify any object in particular. So therefore, how do I say on the next line to change the Z elevation of the object that was just created by name? I can't pick any object out of the list of existing objects, because it could be any one of them.

  • Ok, I've been working on this problem for hours with no luck. I've moved on to some different method which I'm sure should work, but it just doesn't. My code looks like this:

    If "view" (an object) overlaps "terrain" (a family),

    subevent - pick "3dblocks" (another family) by comparison: if 3dblocks private variable "name" is the same as terrain private variable "name",

    then:

    System: create object 3dblocks

    3dblocks: set Z to "view" private variable "Z"

    To me, that seems like it should work. It looks as though I'm specifying the correct 3d box within the "3dblocks" family, but when the family instance is created it is a random 3d box from the family. I really need help with this one :/

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