Mod:Knightcore/Knightcore: Difference between revisions

From PMDOWiki
Imbion (talk | contribs)
Created page with "{{stub}} The following functions are found in the <code>Knightcore.lua</code> file in Knightcore. These functions can be called from other lua script files by including the line <code>require 'knightcore.Knightcore'</code>. == SetCheckpoint == Sets the checkpoint in the save file to the given parameters. == IsBagFull == Returns true if the bag is full, false if it is not. == ObtainItem == Gives the player an item. If they bag is full, it will be put..."
 
Imbion (talk | contribs)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{stub}}
''Main Page: [[Mod:Knightcore]]''
The following functions are found in the <code>Knightcore.lua</code> file in [[Mod:Knightcore|Knightcore]]. These functions can be called from other lua script files by including the line <code>require 'knightcore.Knightcore'</code>.
 
The following functions are found in the <code>Knightcore.lua</code> file in [[Mod:Knightcore|Knightcore]]. These functions can be called from other lua script files by including the line <code>require 'knightcore.Knightcore'</code>, and then called with the prefix <code>Knightcore</code>.


== SetCheckpoint ==
== SetCheckpoint ==
Sets the checkpoint in the save file to the given parameters.
Sets the checkpoint in the save file to the given parameters.
* <code>zone</code>, string: The [[zone]] to set a checkpoint at.
* <code>segment</code>, string: The index of the [[segment]] to set a checkpoint at.
* <code>map</code>, string: The name of the [[map]] to set a checkpoint at.
* <code>entry</code>, string: The entry point of the map itself to place the checkpoint at.


== IsBagFull ==
== IsBagFull ==
Line 11: Line 17:
Gives the player an item. If they bag is full, it will be put into storage.
Gives the player an item. If they bag is full, it will be put into storage.


'''Note: Not fully implemented/tested yet, please do not use yet.'''
'''Note: Not fully implemented/tested, please do not use yet.'''

Latest revision as of 02:27, 22 February 2026

Main Page: Mod:Knightcore

The following functions are found in the Knightcore.lua file in Knightcore. These functions can be called from other lua script files by including the line require 'knightcore.Knightcore', and then called with the prefix Knightcore.

SetCheckpoint

Sets the checkpoint in the save file to the given parameters.

  • zone, string: The zone to set a checkpoint at.
  • segment, string: The index of the segment to set a checkpoint at.
  • map, string: The name of the map to set a checkpoint at.
  • entry, string: The entry point of the map itself to place the checkpoint at.

IsBagFull

Returns true if the bag is full, false if it is not.

ObtainItem

Gives the player an item. If they bag is full, it will be put into storage.

Note: Not fully implemented/tested, please do not use yet.