Frictional Games Forum (read-only)
Script problem or Impulse problem? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Script problem or Impulse problem? (/thread-10363.html)

Pages: 1 2


RE: Script problem or Impulse problem? - Your Computer - 09-18-2011

(09-18-2011, 06:09 AM)Bennick Wrote: Should I move all my AddEntityCollideCallbacks to OnStart? What's the difference between OnStart and OnEnter?

If i understand things correctly, the difference deals with whether or not the user can save their progress. OnEnter will always be called regardless, and OnStart will only be called once if the user is allowed to have states saved (i.e. game saves), otherwise it should act as OnEnter.

BTW, have you tried spacing out "string&in" to "string &in"? Not sure if that makes a difference, though, as i've always had mine spaced out.


RE: Script problem or Impulse problem? - Bennick - 09-18-2011

(09-18-2011, 06:36 AM)Your Computer Wrote:
(09-18-2011, 06:09 AM)Bennick Wrote: Should I move all my AddEntityCollideCallbacks to OnStart? What's the difference between OnStart and OnEnter?

If i understand things correctly, the difference deals with whether or not the user can save their progress. OnEnter will always be called regardless, and OnStart will only be called once if the user is allowed to have states saved (i.e. game saves), otherwise it should act as OnEnter.

BTW, have you tried spacing out "string&in" to "string &in"? Not sure if that makes a difference, though, as i've always had mine spaced out.
Well I don't space them out and all my other functions work perfectly. Idk. :/


RE: Script problem or Impulse problem? - Your Computer - 09-18-2011

(09-18-2011, 06:59 AM)Bennick Wrote: Well I don't space them out and all my other functions work perfectly. Idk. :/

Are you positive that you have the item "letterkey"? If you don't have that item at the time of colliding with the area, you have lost your chance to get the desired result from the callback (given the fact that you are telling the script to remove the callback upon collision), therefore the second area, "biblescript," likewise won't activate.


RE: Script problem or Impulse problem? - Bennick - 09-18-2011

(09-18-2011, 11:26 AM)Your Computer Wrote:
(09-18-2011, 06:59 AM)Bennick Wrote: Well I don't space them out and all my other functions work perfectly. Idk. :/

Are you positive that you have the item "letterkey"? If you don't have that item at the time of colliding with the area, you have lost your chance to get the desired result from the callback (given the fact that you are telling the script to remove the callback upon collision), therefore the second area, "biblescript," likewise won't activate.
Actually, strangest thing, I got it to work. Apparently I would type String&in asParent but then type String &in as Child with a space. Making it more consistent got me the desired result. The funny thing is, I've had that space and non space syntax before and it was no problem for other functions... But I guess I've learned my lesson: consistency. Now what would be the best impulse number to make them books fly!? Tongue


RE: Script problem or Impulse problem? - RawkBandMan - 09-18-2011

(09-18-2011, 06:09 AM)Bennick Wrote:
(09-18-2011, 05:31 AM)MrBigzy Wrote: Is the script area named "biblescript"?
Is the callback for it in OnStart?
The scriptarea for "bible" is "biblescript"
And everything is under OnEnter. Should I move all my AddEntityCollideCallbacks to OnStart? What's the difference between OnStart and OnEnter?
OnEnter means it happens each time you enter the room. OnStart only happens the first time you do that scripting I believe....





RE: Script problem or Impulse problem? - MrBigzy - 09-18-2011

OnStart happens the first time you enter the map. OnEnter happens everytime you enter the map.



RE: Script problem or Impulse problem? - Bennick - 09-18-2011

(09-18-2011, 05:54 PM)MrBigzy Wrote: OnStart happens the first time you enter the map. OnEnter happens everytime you enter the map.
Aha, thanks. Big Grin