Forum rules - please read before posting.

Run script every time a character is added to the scene?

Hi, I'm not sure how to go about this,

Basically in every scene, the characters need to be resized which is fine when they are added on start as I have a script which resizes each character inside the onstart script, however I have characters that get added to the scene as they "come and go" (random chance of them spawning to shuffle up the background NPCs) and I can't think of a way to run a script whenever they're added to the scene so that I can resize them.

Basically character gets added to a scene > script is run to resize that character.

Do you have any ideas?

Comments

  • By "onstart script", do you mean your OnStart cutscene, or a custom script's "Start" function?

    A Start function should run when placed on an object that is spawned in the scene regardless of when it happens.  You could maybe try OnEnable instead.  How are you spawning your characters?  With Object: Add or remove?


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.