Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Link->Action oddity

2 replies · 1,190 views · Started 26 October 2007

Situation:
The option to select items with A or B button is on;
Scripted weapon selected for A button;
Script uses Link->Action = 2 (attacking) to get Link to stab;
Result:
Link uses defalt sword attack (even though sword is not selected at all)
and in this case Slash is on, so Link slashes.
This problem is only if the scripted weapon is on A button, works perfectly on B button

EDIT: upon further testing the B button does the same thing, it makes Link stab first, then slash with the defult sword.. (is this normal for Link->Action = 2)

You can see an example of this by downloading the quest here: http://www.armageddongames.net/forums//thread/99953/

The thing is, Link->Action gives you a close look at Link's internal state, but it's not the whole story - tons of other internal flags determine whether Link is attacking with the sword or hammer, if he's slashing, if he's charging, if he's spin-attacking and for how long, etc. Link->Action gives you a pretty good idea of what Link is doing at any one time, but writing to it is pretty much undefined behavior.

In fact I think Link->Action should be read-only for now, until a correct, higher-level replacement can be added post-2.50.