PDA

View Full Version : Scripting suggestions



Cloral
09-06-2006, 06:04 PM
It would probably be helpful to the developers to get some ideas of scripting features that would be useful for us. So I'm starting the list. Add on as you see fit.


method: freezeAction()
Causes Link and the enemies to freeze in place. This would be used when you want to pause to allow some action to happen, without affecting anything else going on in the room. For instance, this could be used to allow a wall to slowly slide into place when a switch is triggered. Check out the upper right cornder of the first dungeon in the dark world of LttP to see a good example of this - when you hit the statue with an arrow, Link and the trap freeze in place while the wall takes some 20-30 seconds to reach it's final destination.
method: unFreezeAction()
The reverse, this starts the action up again.
method: Link->Hide()
Turns Link invisible.
method: Link->Show()
Makes Link visible again.
method: Link->Freeze()
Link stops in place, will not respond to user input.
method: Link->UnFreeze()
Link responds to input again.
method: Spawn(type, x, y)
Spawns an enemy of type type at location (x, y). A very useful action this would be.

DarkDragon
09-06-2006, 06:07 PM
Freeze and Unfreeze are already implemented, in the form of the boolean Link::InputsEnabled.

_L_
09-06-2006, 11:12 PM
I approve of the Hide and Show functions.
Though Spawn should probably be called MkEnemy or something.

Dark Nation
09-07-2006, 08:01 AM
Actually, InputsEnabled has been removed. As well as the ForcedA, ForcedB, ForcedUp, etc. variables and the GetA, GetB, GetUp, etc variables. They have been replaced with the InputA, InputB, InputUp, etc. variables. This way you can read and intercept user control on the script level from one set of variables. if you want to disable user input, just run these lines:


SETV inputa,0
SETV inputb,0
SETV inputup,0
SETV inputdown,0
SETV inputleft,0
SETV inputright,0
SETV inputstart,0

If you only want to disable the sword (without using the bubbles), just do this:


SETV inputa,0


You can also cause Link to do things. If you want him to walk left 50 steps, just use the input disabling code above, but change the inputleft line to:



SETV inputleft,1

Warlock
09-07-2006, 10:54 AM
Does that work for everything though, or just Link? I like Cloral's freezeAction() function - it would be nice to have one that just froze everything including enemies. Then you could do, say, a *real* message box or something.

Saffith
09-07-2006, 04:27 PM
If you only want to disable the sword (without using the bubbles), just do this:


SETV inputa,0


You can also cause Link to do things. If you want him to walk left 50 steps, just use the input disabling code above, but change the inputleft line to:



SETV inputleft,1
If I'm reading this correctly, you're saying that setting an input variable to 0 disables it and if setting it to 1 forces it?
If that's the case, what do you set it to to restore it to normal?

jman2050
09-07-2006, 04:48 PM
the thing is, according to DN, the forcing and the disabling only works for one frame.

Rakki
09-08-2006, 05:38 AM
And again: What about Select? Remember, map button? Not that I've got any terribly useful ideas for what to do with an extra button, but, SOMEBODY might.