| Blockland Forums > Modification Help |
| Player Type Functions? |
| << < (2/2) |
| Port:
--- Quote from: jes00 on April 09, 2012, 09:48:15 PM ---When are onAdd, onRemove, and onNewDatablock called and what are their vars? --- End quote --- The only argument they have (aside from the standard argument (the object) for namespaces) is the object it is referring to. ::onAdd is called when a new object is created using this datablock. ::onRemove is called when an object using this datablock is deleted. ::onNewDatablock is called when an already existing object changes to this datablock. |
| jes00:
--- Quote from: Port on April 10, 2012, 03:31:59 AM ---The only argument they have (aside from the standard argument (the object) for namespaces) is the object it is referring to. ::onAdd is called when a new object is created using this datablock. ::onRemove is called when an object using this datablock is deleted. ::onNewDatablock is called when an already existing object changes to this datablock. --- End quote --- Do any of these need to be packaged? |
| Port:
--- Quote from: jes00 on May 24, 2012, 01:31:23 PM ---Do any of these need to be packaged? --- End quote --- Some of them do in certain situations. I recommend using Clockturn's object method support functions to check if the function already exists, and if so, call the parent. |
| Navigation |
| Message Index |
| Previous page |