playMaker

Author Topic: Send Events to Future Additive Level Load Objects?  (Read 1566 times)

createasaurus

  • Full Member
  • ***
  • Posts: 146
Send Events to Future Additive Level Load Objects?
« on: November 08, 2014, 08:38:18 AM »
My game is using Additive Level Load to add elements as the game progresses.  I have a Manager FSM loaded at game start.  Later in the game, when game objects are loaded into the level, I'd like Manager FSM to be able to Send Events to them.  However, when I use the Send Event command... it does not seem to give the option to access objects not currently in the level.   But the objects WILL be in the level when the game is running and that is when the Manager FSM will try to talk to them.

Thoughts on how to approach this?
Many thanks!

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Send Events to Future Additive Level Load Objects?
« Reply #1 on: November 08, 2014, 10:20:18 AM »
You need to identify your objects after the level loads.

The way I do this is create your variables in the manager, go ahead and design it like you want with those variables but they'll be empty.. Then as the objects are created in the scene have them find the manager and fill those variables on it with themselves. It depends on what you're actually doing if this will work out well for you or not. Global variables are available to you, as well as finding objects by name or layer, etc.. So you have a few ways to get information into those variables.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

createasaurus

  • Full Member
  • ***
  • Posts: 146
Re: Send Events to Future Additive Level Load Objects?
« Reply #2 on: November 08, 2014, 02:47:18 PM »
Thank you very much!
« Last Edit: November 10, 2014, 01:50:58 PM by createasaurus »