Anonymous user
Scripting, Code & Interaction: Difference between revisions
no edit summary
No edit summary |
*>Ashen No edit summary |
||
Line 332: | Line 332: | ||
All other commands must be inside a function - be it one you've created yourself, or a room' Interaction function ('Player enters room before fadein', 'Player leaves room', etc). See also the earlier entries on [[Scripting%2C_Code_%26_Interaction#Placing_your_code:_more_basics|placing code]] and [[Scripting%2C_Code_%26_Interaction#Creating_your_own_custom_functions|creating functions]]. | All other commands must be inside a function - be it one you've created yourself, or a room' Interaction function ('Player enters room before fadein', 'Player leaves room', etc). See also the earlier entries on [[Scripting%2C_Code_%26_Interaction#Placing_your_code:_more_basics|placing code]] and [[Scripting%2C_Code_%26_Interaction#Creating_your_own_custom_functions|creating functions]]. | ||
==Turning Objects/Hotspots/Regions On or Off in another room.== | |||
''I can't seem to find in the manual how to turn objects etc, on and off from another room. Is there just not a command for this or am I going insane?'' | |||
No, you're not going insane - there's no direct way to do this. You'll have to use variables (GlobalInts or your own - see the earlier entry on [[Scripting%2C_Code_%26_Interaction#Working_with_variables:_the_basics|working with variables]]), and check them in the 'Player enters Room' interaction of the room the Object (or whatever) is in. If you're likely to need to do it a lot you might want to try the {{Thread|20650|OtherRoom module}}, which handles everything for you. | |||
[[Category:AGS Beginners' FAQ]] | [[Category:AGS Beginners' FAQ]] | ||
[[Category:Scripting]] | [[Category:Scripting]] |