Help! - issues not being able to set or inherit layer / Z depth for spawned actors?

JapsterJapster Member Posts: 672

Hi guys - could really do with some help, as this is driving me mad!

I spawn board cells into a game board, the edge graphic of which, is visually 'higher' than the cells. The prototype and design-time instances of these cells are in the correct layer, and shadows from the 'raised' game board are supposed to fall over the cells?

When these cells were created at design time, and I could manually change the order, all was good. However, when spawning new cells, I seem to have no control over the Z index/order of the spawned cells? - I have tried altering the order, moving between layers, etc, but all to no avail - they don't seem to move any further even in front of (let alone behind!) other actors, regardless of what I do to either the spawned or initial actor or prototype?

Any help in being able to specify or restrict spawned actor Z location/order would be massively appreciated guys!

Cheers!

Den.

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    The Spawn Behavior has an option to spawn in front of or behind the spawners actor or layer, but other than that you can't change layer order at run time.

    I have seen some work arounds in the forum but have not checked out how they have worked it, I believe @socks has done something for use in an Isometric game.

  • LumpAppsLumpApps Member Posts: 2,880

    If you really need to switch layers you can use work with the alpha of actors and use duplicates. I hope that makes sense.

  • JapsterJapster Member Posts: 672

    @jamie_c said:
    The Spawn Behavior has an option to spawn in front of or behind the spawners actor or layer, but other than that you can't change layer order at run time.

    I have seen some work arounds in the forum but have not checked out how they have worked it, I believe socks has done something for use in an Isometric game.

    Cheers both - will check into your suggestions, but yeah, think I tried behind but no joy... :(

    Thanks for the fast responses though! - Will try these out tonight - Duplicate sounds interesting - I'm spwaning over 100 actors though, using each to spawn a fresh one until a limit/total is hit, so will have to see if duplicate will work, as each have their own unique row/column index values?

    Cheers again for the super-fast help though guys!

    Den.

  • JapsterJapster Member Posts: 672

    Cheers guys - well, I played around with the settings, didn't seem to help, but I ended up shifting my gameboard shadow to the top in design mode, to try it out - that worked as a test, so I shuffled the order of everything BUT my cell instance, and that seemed to work when I previewed, with the shadow now falling on the cells. :)

    Thanks for the suggestions!

    PS - finding 10.5 still excruciatingly buggy when expanding/scrolling through behaviours - thought it was much better in general when I was working on my project the night before last, but last night it must have crashed on me about a dozen times!!! Argh!!!...

Sign In or Register to comment.