… | |
… | |
122 | made. The copy automatically has all attachments the original object |
122 | made. The copy automatically has all attachments the original object |
123 | had. The perl variables get copied in a shallow way (references are shared |
123 | had. The perl variables get copied in a shallow way (references are shared |
124 | between instances). If this is not the behaviour you need, you have to |
124 | between instances). If this is not the behaviour you need, you have to |
125 | adjust the B<destination> object as you see fit. |
125 | adjust the B<destination> object as you see fit. |
126 | |
126 | |
|
|
127 | =head3 destroy (object) |
|
|
128 | |
|
|
129 | Invoked when the crossfire object gets destroyed, and only when the object |
|
|
130 | has a handler for this event. This event can occur many times, as its |
|
|
131 | called when the in-memory object is destroyed, not when the object itself |
|
|
132 | dies. |
|
|
133 | |
127 | =head3 tick (object) |
134 | =head3 tick (object) |
128 | |
135 | |
129 | Invoked whenever the object "ticks", i.e. has positive B<speed_left>. Only |
136 | Invoked whenever the object "ticks", i.e. has positive B<speed_left>. Only |
130 | during ticks should an objetc process any movement or other events. |
137 | during ticks should an objetc process any movement or other events. |
131 | |
138 | |
… | |
… | |
211 | =head2 MAP EVENTS |
218 | =head2 MAP EVENTS |
212 | |
219 | |
213 | These events are generally dependent on a map and thus all have a map |
220 | These events are generally dependent on a map and thus all have a map |
214 | as first argument. |
221 | as first argument. |
215 | |
222 | |
|
|
223 | =head3 instantiate (map) |
|
|
224 | |
|
|
225 | Original B<map> has been loaded (e.g. on first use, or after a map |
|
|
226 | reset). |
|
|
227 | |
216 | =head3 reattach (map) |
228 | =head3 reattach (map) |
217 | |
229 | |
218 | Invoked whenever attachments/plug-ins need to get reattached to the |
230 | Invoked whenever attachments/plug-ins need to get reattached to the |
219 | B<map>. This usually happens when the map was loaded from disk, or when the |
231 | B<map>. This usually happens when the map was loaded from disk, or when the |
220 | server was reloaded. |
232 | server was reloaded. |
221 | |
233 | |
222 | =head3 instantiate (map) |
234 | =head3 destroy (map) |
223 | |
235 | |
224 | Original B<map> has been loaded (e.g. on first use, or after a map |
236 | Invoked when the map object gets destroyed, and only when the map object |
225 | reset). |
237 | has a handler for this event. This event can occur many times, as its |
|
|
238 | called when the in-memory object is destroyed, not when the object itself |
|
|
239 | dies. |
226 | |
240 | |
227 | =head3 swapin (map) |
241 | =head3 swapin (map) |
228 | |
242 | |
229 | Invoked when a previously swapped-out temporary B<map> has been loaded again. |
243 | Invoked when a previously swapped-out temporary B<map> has been loaded again. |
230 | |
244 | |