Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Questions on scripts and script placement.
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#8
RE: Questions on scripts and script placement.

(08-17-2013, 04:49 AM)Your Computer Wrote:
(08-17-2013, 04:27 AM)goregrinder99 Wrote: Item Interactions and Collide Callbacks should always be placed in OnStart?

As i said, that depends on what you want to accomplish. The functions used to set up callbacks tend to allow you to declare whether or not you want that callback to remain after triggering it. OnStart gets called once for each new session of the map. (Loading a save is not a new session, and so it doesn't get called then.) OnEnter gets called every time the map is loaded outside of saves. All of this means there is one point in time where OnStart and OnEnter are both called, but every other time only OnEnter would be called.

So either way when you load a save, callbacks are negated and no longer in effect? Not sure if I'm getting this... -_-

Say I have an AddEntityCollideCallback and an AddUseItemCallback. What would be the effect of having them in the OnStart or the OnEnter function?

If I open the game and save right away and load it up, will the callbacks still take effect when I either hit the collide area or try to unlock a door with a key if the scripts are set in the OnStart or OnEnter or both?

-Grind to the Gore-
08-17-2013, 05:56 AM
Find


Messages In This Thread
RE: Questions on scripts and script placement. - by GoreGrinder99 - 08-17-2013, 05:56 AM



Users browsing this thread: 1 Guest(s)