Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: SSH on Tue 08/06/2004 19:36:50

Title: Removing scripting interaction functions
Post by: SSH on Tue 08/06/2004 19:36:50
If I remove an interaction from a room (i.e. I had a hotspot that was set to RunScript on each interaction) and then I change the interactions so they no longer run script, what is the situation with the hotspotX_a, hotspotX_b functions in the room script: can I delete them? What about the corresponding #sectionstart lines? Ditto with room_* and object_* functions?

Title: Re: Removing scripting interaction functions
Post by: ®2-D2 on Tue 08/06/2004 23:27:56
Quotecan I delete them?
I'd say yes, I don't see why not.

QuoteDitto with room_* and object_* functions?
same here
Title: Re: Removing scripting interaction functions
Post by: Ishmael on Wed 09/06/2004 06:10:41
I reckon they be gone when you remove the interaction... I wouldn't do anything for them, if they still remain untouched after I remove the RunScript, and wait to see of the next version does any diffrent... but then again, what harm could removing them do? They do not exist anywhere else anymore...
Title: Re: Removing scripting interaction functions
Post by: Pumaman on Wed 09/06/2004 21:46:20
When you change a Run Script interaction to something else, or delete the interaction, it should prompt you and ask whether to delete the script function. If you click No, then the script function effectively becomes 'orphaned' since it is now disconnected from the interaction editor, so it will never run. If this is the case, feel free to delete it - just don't delete one which is still in use.
Title: Re: Removing scripting interaction functions
Post by: MrColossal on Thu 10/06/2004 08:35:53
Quote from: Pumaman on Wed 09/06/2004 21:46:20
just don't delete one which is still in use.

Or?

Is that like crossing the streams?
Title: Re: Removing scripting interaction functions
Post by: Gilbert on Thu 10/06/2004 08:46:49
Actually my suggestion is that you may not do that unless you are REALLY conscious on what you are going to do. You can always comment that part of the code (simlpest way is to enclose it with /* and */) so you can save the codes for a bit longer, in case you still want it for reference, copying from it, etc.
Title: Re: Removing scripting interaction functions
Post by: Scorpiorus on Thu 10/06/2004 21:05:49
Quote from: MrColossal on Thu 10/06/2004 08:35:53
Quote from: Pumaman on Wed 09/06/2004 21:46:20
just don't delete one which is still in use.

Or?

Is that like crossing the streams?
I believe that if you remove the function that was attached to an interaction then on running it AGS will abort the game with an error message telling about the script was not found.
Title: Re: Removing scripting interaction functions
Post by: MrColossal on Fri 11/06/2004 09:12:21
Oh that's not so bad... Here I am trying to imagine all life as I know it stopping instantaneously, and every molecule in my body exploding at the speed of light.
Title: Re: Removing scripting interaction functions
Post by: Pumaman on Fri 11/06/2004 16:07:07
Well, there is a 14% chance of that happening as well, so be careful.
Title: Re: Removing scripting interaction functions
Post by: SSH on Fri 11/06/2004 17:23:25
What about the #sectionstart lines... will they get deleted as well if I remove the run script interaction? If not, it is safe to remove them?
Title: Re: Removing scripting interaction functions
Post by: Pumaman on Sat 12/06/2004 11:53:17
They should indeed get removed along with the rest of the function.