Forum rules - please read before posting.

Trigger Function - Add object to anything other than camera or player?

Hi guys.
I could not find this problem so apologies if it was covered previously, but it is fairly important to my game and it seems to be more of a lack of function rather than a bug - or there may be a work around, if so please i'd love to know!

Essentially I want to be able to have special effects fire off when a character hits a trigger.

I have this working fine - but the problem is the effects have many children. The remember visibility scripts dont work on them (they have many many children) and applying the scripts to all parts of the effect doesnt work, nor does having them all in the root directory - "apply to all children" has absolutely no effect whatsoever on the children of the object for some reason for me.

As I said applying it to all children doesnt work either - so using the "remember visiblity" script in conjunction with the trigger action Object : Visbility does not work for me.

Long story short, essentially I have it working like I want using the Trigger function
Object:Add or remove

But..

There is only 3 options
image

Does anyone know of a way I can make the position relative to another object in the scene??

I have thought using a dummy camera but I can only make it relative to the active camera which defeats that purpose.

Thanks for any help!

Comments

  • Bear in mind that the Visibility Actions / Remember script affect Unity's Renderer components - so if your effect relies on Particle Systems then it won't have an effect.

    You can use the Particle Switch component for that, if so - see Section 8.6 of the Manual.

    I agree that the Object: Add or remove Action should have a "generic" relative option, and I'll see that this gets added.

    In the meantime, you could try keeping the effect in the scene but hidden from view.  The Object: Transform Action allows you to move an object by to a Marker's position - so if you first used Object: Teleport Action to reset the effect's position to 0,0,0, it may be possible to achieve the same thing.
  • Thanks,
    Yeah I tried the particle switch but there are so many of them to add it became very time consuming to try and link them all up to fire at the right time (the effects have cascading particles, set to fire off at different intervals.. i.e a ground cracks.. then lava comes out, then fire.. then sparks...

    The particle switch component messes with the timing of these so they all fire off at the same time and for me to try and rework their animations is a bit beyond me.

    The problem with the Object transform action and keeping them out of view until needed and then moving them to a transform when needed - is that they are animation driven and if they are spawned into a scene at the start of the scene - even out of view, they will still run through their particle animation chain.

    So, by the time I need them and magically bring them into view - they have already gone through the cycle of particle animations - essentially I need to spawn them on the spot to make them work correctly.

    I will wait hopefully for an update to Make the position of the game object relative to another game object.

    Thanks.
  • Edit,

    I can confirm a work around, thanks for your suggestion with the marker.

    If you add a second action to the trigger as you said "Teleport" to a marker I have set as the child of a game object - the effect spawns at the selected marker!

    Thanks mate, seriously great support here
  • No problem - actually, I'll be releasing a v1.56g update shortly that will add a "Relative To GameObject" option.  It wasn't hard to add, and a bugfix update was necessary at short notice.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.