Open main menu

Difference between revisions of "AGIWiki/AGI Studio Template Game"

m
no edit summary
(Created page with "{{AGIWiki}} The '''AGI Studio Template Game''' is a one-room game that serves as a starting point for game authors to build their own games. It features a defau...")
 
m
Line 26: Line 26:


You know if your version of the template game contains the bug if the following code appears in LOGIC.000:
You know if your version of the template game contains the bug if the following code appears in LOGIC.000:
 
<syntax type="C++">
  if (new_room) {          // First interpreter cycle in a new room
  if (new_room) {          // First interpreter cycle in a new room
                         // Note: Everything other than logic 0 is discarded
                         // Note: Everything other than logic 0 is discarded
Line 39: Line 39:
                             // on this cycle (if turned on)
                             // on this cycle (if turned on)
  }
  }
 
</syntax>
If this code ''does'' appear in your version of the template game, then you should change it to:
If this code ''does'' appear in your version of the template game, then you should change it to:
 
<syntax type="C++">
  if (new_room) {          // First interpreter cycle in a new room
  if (new_room) {          // First interpreter cycle in a new room
                         // Note: Everything other than logic 0 is discarded
                         // Note: Everything other than logic 0 is discarded
Line 59: Line 59:
                             // on this cycle (if turned on)
                             // on this cycle (if turned on)
  }
  }
 
</syntax>
This bug has since been corrected in the template game that is available from http://www.agigames.com<nowiki>; however, </nowiki>[[AGIWiki/AGI Studio|AGI Studio]] may still be packaged with the version containing the bug.
This bug has since been corrected in the template game that is available from http://www.agigames.com<nowiki>; however, </nowiki>[[AGIWiki/AGI Studio|AGI Studio]] may still be packaged with the version containing the bug.


Line 67: Line 67:


The biggest trouble with this bug is that once you type "tp" and press Enter there is no way to cancel the teleport. Pressing Enter with a blank entry is the same as entering 0. Fortunately, there is a simple fix. In LOGIC.099, find the code that reads:
The biggest trouble with this bug is that once you type "tp" and press Enter there is no way to cancel the teleport. Pressing Enter with a blank entry is the same as entering 0. Fortunately, there is a simple fix. In LOGIC.099, find the code that reads:
 
<syntax type="C++">
  if (said("tp")) {
  if (said("tp")) {
     get.num("new room: ", v255);
     get.num("new room: ", v255);
     new.room.v(v255);
     new.room.v(v255);
  }
  }
 
</syntax>
Then change it to:
Then change it to:
 
<syntax type="C++">
  if (said("tp")) {
  if (said("tp")) {
     get.num("new room: ", v255);
     get.num("new room: ", v255);
Line 85: Line 85:
     }
     }
  }
  }
 
</syntax>
Alternately, you can eliminate the "Can't tp to room 0" message and change the inner [[AGIWiki/If statement|if statement]] to read:
Alternately, you can eliminate the "Can't tp to room 0" message and change the inner [[AGIWiki/If statement|if statement]] to read:
 
<syntax type="C++">
  if (v255 != 0) {
  if (v255 != 0) {
     new.room.v(v255);
     new.room.v(v255);
  }
  }
 
</syntax>
This issue has also been corrected in the latest releases of the template game, available from http://www.agigames.com<nowiki>; however, </nowiki>[[AGIWiki/AGI Studio|AGI Studio]] may still be packaged with the buggy version of the template game.
This issue has also been corrected in the latest releases of the template game, available from http://www.agigames.com<nowiki>; however, </nowiki>[[AGIWiki/AGI Studio|AGI Studio]] may still be packaged with the buggy version of the template game.


885

edits