HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: $MySpecOracle vs $SPECORACLEUTILS._GetOracleFromType("MySpecOracle")  (Read 682 times)

driftwood

  • World Owners
  • ****
  • Posts: 4
    • View Profile

Hello,

So these two objects seem to return different nodes according to a printout of their respective IDs.

Also $SPECORACLEUTILS._GetOracleFromType("MySpecOracle").GetSpecByKey seems to work, while my prototype $MySpecOracle seems to only have a partial list of my specs, meaning GetSpecByKey returns 0 for some specs, but not others.

Thankfully $SPECORACLEUTILS._GetOracleFromType("MySpecOracle").GetSpecByKey so far, *knock on wood* seems to return all of my specs...

Any ideas?

I have another Oracle also which it's prototype has been behaving so far and returns any spec with GetSpecByKey.

Thank you

Edit:  Hmm, seems $MySpecOracle is a system node that when invoked, becomes a copy of my prototype, and goes away when the area it was created in goes away.  However, if I invoke it, and then create more specs, the system node does not pick up those new specs until it is recreated?

If this is the case, I guess I'll just use the $SPECORACLEUTILS method which seems to work better... or I guess I could use some GetPrototype command to get my SpecOracle prototype rather than the system node.
« Last Edit: Jan 21, 13, 11:55:29 PM by driftwood »
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.

Your conclusion in your edit is correct.  Stick with _GetOracleFromType(); that is the proper and most reliable way to get it.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

driftwood

  • World Owners
  • ****
  • Posts: 4
    • View Profile

Great, thank you sir.
Logged