Get your own free workspace
View
 

AddActorEffect

Page history last edited by Gamemaster 3 years, 11 months ago

 

AddActorEffect

Usage:

                AddActorEffect(Actor, Effect, Attribute, Value, Time, IconID)

Description:

The AddActorEffect command creates an icon on a player's screen for a specified amount of time. You may also choose one attribute to affect for the duration, but other effects are up to you to script. This is useful for spells which have a temporary effect, traps, diseases, powerups and other effects. If you add an effect with the same name twice, the effect duration will be extended, but the icon will not appear twice on the player's screen.

The Effect parameter is the name you wish to give to the effect. This is displayed to the player when they hover the mouse over the icon on their screen. The Attribute is the name of an attribute to alter for the duration of the effect, and can be left blank if you do not wish to affect any attribute. The Value is the amount to change the attribute by, and can be positive negative. Time is the length of time (in seconds) for which the effect will last. IconID is the ID number of the texture to use for the effect icon.

Example:

                Function Main()
                        // Poison the player!
                        AddActorEffect(Actor(), "Poison", "Strength", -10, 30, 11)
                        Return()
                End Function

Comments (0)

You don't have permission to comment on this page.