1 | #! perl |
|
|
2 | |
|
|
3 | # |
1 | # |
4 | # This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | # This file is part of Deliantra, the Roguelike Realtime MMORPG. |
5 | # |
3 | # |
6 | # Copyright (©) 2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | # Copyright (©) 2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
7 | # |
5 | # |
8 | # Deliantra is free software: you can redistribute it and/or modify it under |
6 | # Deliantra is free software: you can redistribute it and/or modify it under |
9 | # the terms of the Affero GNU General Public License as published by the |
7 | # the terms of the Affero GNU General Public License as published by the |
10 | # Free Software Foundation, either version 3 of the License, or (at your |
8 | # Free Software Foundation, either version 3 of the License, or (at your |
11 | # option) any later version. |
9 | # option) any later version. |
12 | # |
10 | # |
13 | # This program is distributed in the hope that it will be useful, |
11 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. |
14 | # GNU General Public License for more details. |
17 | # |
15 | # |
18 | # You should have received a copy of the Affero GNU General Public License |
16 | # You should have received a copy of the Affero GNU General Public License |
19 | # and the GNU General Public License along with this program. If not, see |
17 | # and the GNU General Public License along with this program. If not, see |
20 | # <http://www.gnu.org/licenses/>. |
18 | # <http://www.gnu.org/licenses/>. |
21 | # |
19 | # |
22 | # The authors can be reached via e-mail to <support@deliantra.net> |
20 | # The authors can be reached via e-mail to <support@deliantra.net> |
23 | # |
21 | # |
24 | |
22 | |
25 | =head1 NAME |
23 | =head1 NAME |
26 | |
24 | |
… | |
… | |
81 | } |
79 | } |
82 | |
80 | |
83 | =item trigger $id_or_object[, $state] |
81 | =item trigger $id_or_object[, $state] |
84 | |
82 | |
85 | Triggers the linked chain with the given I<connected> id, or the connected |
83 | Triggers the linked chain with the given I<connected> id, or the connected |
86 | chain associated with the given object (if an objetc reference is passed), |
84 | chain associated with the given object (if an object reference is passed), |
87 | and passes the given state (or C<1>, if missing) to it. |
85 | and passes the given state (or C<1>, if missing) to it. |
88 | |
86 | |
89 | =cut |
87 | =cut |
90 | |
88 | |
91 | sub trigger($;$) { |
89 | sub trigger($;$) { |
92 | $self->map->trigger ($_[0], $#_ ? $_[1] : 1, $self); |
90 | $self->map->trigger ($_[0], $#_ ? $_[1] : 1, $self); |
93 | } |
91 | } |
94 | |
92 | |
95 | =item timer $id_or_object, $seconds |
93 | =item timer $id_or_object, $seconds |
96 | |
94 | |
97 | Starts the timer on the given mapscript object (usually, $id_or_object is |
95 | Starts the timer on the given mapscript object (usually, C<$id_or_object> is |
98 | C<$self>). When the timer expires on the mapscript object, it will trigger |
96 | C<$self>). When the timer expires on the mapscript object, it will trigger |
99 | the script with C<$activator == $self> and C<$originator == undef>. |
97 | the script with C<$activator == $self> and C<$originator == undef>. |
100 | |
98 | |
101 | =cut |
99 | =cut |
102 | |
100 | |