Difference between revisions of "MPUZ: LinkIDs"

From Mario Fan Games Galaxy Wiki
 
m
 
Line 1: Line 1:
 
{{MPUZ}}
 
{{MPUZ}}
A '''LinkID''' is a special ID value objects possess; unlike ''sysid'', multiple objects can share the same LinkID, allowing them to be connected in some fashion. For example, a [[MPUZ: Objects|P-Switch]] might share a LinkID with a certain group of [[MPUZ: Objects|Bricks]], causing the latter to become [[MPUZ: Objects|Coins]] when the former is pressed.  
+
'''LinkIDs''' are integers MPUZ uses to determine which objects are logically related. For instance, a [[MPUZ: Objects#P-Switch|P-Switch]] may share a LinkID with a group of [[MPUZ: Objects#Brick|Bricks]], changing the latter into [[MPUZ: Objects#Coin|Coins]] when the former is pressed.
  
LinkIDs are associated with the '''[[MPUZ: Functions|object:trigger()]]''' function, and the '''[[MPUZ: Functions|focus:onTrigger()]]''' condition.
+
LinkIDs are associated with the '''[[MPUZ: Functions|object:trigger()]]''' method, and the '''[[MPUZ: Events|onTrigger''X'']]''' event. LinkIDs must be positive for the trigger method to have any effect, which also means they must be greater than 0.
  
The LinkID for an object can be retrieved via ''me.linkid''.
+
The LinkID for an object can be retrieved by accessing ''self.linkid''. It can also be set to a new value to relink this object with a new set of objects.

Latest revision as of 07:14, 4 March 2010

This information is subject to change.
MPUZ
Mpuz logo.png
Development Main Page
Basics
Intermediate
Advanced
  • none
Reference
[Edit]


LinkIDs are integers MPUZ uses to determine which objects are logically related. For instance, a P-Switch may share a LinkID with a group of Bricks, changing the latter into Coins when the former is pressed.

LinkIDs are associated with the object:trigger() method, and the onTriggerX event. LinkIDs must be positive for the trigger method to have any effect, which also means they must be greater than 0.

The LinkID for an object can be retrieved by accessing self.linkid. It can also be set to a new value to relink this object with a new set of objects.