Quote Originally Posted by DarkDragon View Post
ZoriaRPG is right that this is undefined in 2.50.3 (and I don't think writing to Action will ever be supported, due to numerous possible issues with putting Link into an inconsistent state, but some functions to force Link to perform a limited set of actions is plausible.)

From the ZScript documentation:

I don't know the status of this in 2.54.
Writing to ->Action is in fact, supported in 2.50.x, but only to a limited set of actions that are known to work.

Item scripts, in particular, set Link->Action = LA_ATTACKING, many scripts force LA_NONE, or LA_GOTHURT, and so forth. The list of actions known to work (read-write), is as follows:

Code:
const int LA_NONE               = 0;
const int LA_WALKING            = 1;
const int LA_ATTACKING          = 2;
const int LA_HOLD1LAND          = 4; // One hand. Should only be used when not swimming. 
const int LA_HOLD2LAND          = 5; // Both hands. Should only be used when not swimming. 
const int LA_GOTHURTLAND        = 7; //Should only be used when not swimming. 
const int LA_GOTHURTWATER       = 13; //Should only be used when swimming
const int LA_HOLD1WATER         = 14; //Should only be used when swimming
const int LA_HOLD2WATER         = 15; //Should only be used when swimming
All of those work, and are safe.

I was planning to fix this variable, and make as many as possible work, or disable writing to them if that isn't viable, or logical. Most of the above are common enough in item, global, and ffc scripts that supporting them is crucial. I rarely see the *WATER actions called, but I have seen them. People often try to set some of the others, to no avail. Drowning, Diving, Dying, and a few others probably could be supported in the future, but are not defined, and writing to them is not advised at present.

P.S. Setting LA_SWIMMING may have been possible at one time, in the 2.5 beta phase too, before all the land swimming bugs were fixed, and you couldn't make Link swim on any time. Those fixes are likely why it does not work now (if it ever worked, at all, at all). Setting LA_DROWNING, is likely similar. I have never had a reason to try setting that one, and its action would be similar to LA_HOPPING; where writing to LA_HOPPING was disabled.