Difference between revisions of "MPUZ: LinkIDs"
From Mario Fan Games Galaxy Wiki
m |
|||
Line 1: | Line 1: | ||
{{MPUZ}} | {{MPUZ}} | ||
− | + | '''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()]]''' | + | 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 | + | 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 |
---|
Development Main Page |
Basics |
Intermediate |
Advanced |
|
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.