Jump to content

Is "Start Game Enabled" good enough for filling Specific Alias over a long period of time?


RedxYeti

Recommended Posts

Say I have a specific Reference Alias of the Agility BobbleHead. The Player might not encounter that bobblehead for tens of hours.

 

Since its a specific reference will an OnLoad script still run on it after hours of gameplay just using "Start Game Enabled"?

 

Or should I refill the reference some how?

Link to comment
Share on other sites

The OnLoad event fires when the object is loaded. However, the event can't be sent by an empty Reference Alias: if the alias hasn't been filled, it doesn't point to an object and a "None" object can't send events. The script has to know what object is loaded. So, you have to fill the Reference Alias too, Start Game Enabled isn't enough.

Link to comment
Share on other sites

The OnLoad event fires when the object is loaded. However, the event can't be sent by an empty Reference Alias: if the alias hasn't been filled, it doesn't point to an object and a "None" object can't send events. The script has to know what object is loaded. So, you have to fill the Reference Alias too, Start Game Enabled isn't enough.

 

So im using the actual agility bobblehead in game as a specific reference (as in the location its in and the bobblehead as the item). Wouldn't that be enough to fill the reference? also the script is running directly on the alias if that makes any difference.

Link to comment
Share on other sites

 

The OnLoad event fires when the object is loaded. However, the event can't be sent by an empty Reference Alias: if the alias hasn't been filled, it doesn't point to an object and a "None" object can't send events. The script has to know what object is loaded. So, you have to fill the Reference Alias too, Start Game Enabled isn't enough.

 

So im using the actual agility bobblehead in game as a specific reference (as in the location its in and the bobblehead as the item). Wouldn't that be enough to fill the reference? also the script is running directly on the alias if that makes any difference.

 

That would fill the reference, yes. They don't de-fill, if that's what you're concerned about. In terms of OnLoad(), it will run when the bobblehead gets its 3D loaded ie when you go into the area, and time is not a factor here.

Link to comment
Share on other sites

 

That would fill the reference, yes. They don't de-fill, if that's what you're concerned about. In terms of OnLoad(), it will run when the bobblehead gets its 3D loaded ie when you go into the area, and time is not a factor here.

 

 

Perfect, thank you.

 

That is what I was concerned about.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...