PDA

View Full Version : Play Sound, and a boat, plus falling



Majora
05-30-2007, 06:18 PM
play sound: When Link falls for more than X combos (or pixels, whichever ZC recognizes, no preference) in distance in a single fall, a SFX should play (I noticed in the SFX Data under "Quest" goes up to 120-something).

A boat: A FFC King Of Red Lions (more info will be provided as needed)

Falling: This goes with Play sound, and what should happen is this:

1) When Link Falls for a distance of X combos or more, a SFX should play
2) Assuming he's fallen for X combos , he takes X damage
3) When he lands, another SFX plays

If SFX can be triggered via script, I would appreciate it if someone made this for me. (With EXPLICIT directions) also, if it matters, I need this for 254 (scripting could have changed for all I know)

C-Dawg
05-30-2007, 08:55 PM
Sound effects are easy. Check out DarkDragon's thread: "Finally, some documentation." I think the command is "Game->PlaySound(#);" or something very similar.

As for falling... that one's going to be a little tricker. I guess you'd monitor whether there is a solid combo under Link, and increment a variable each tic that there is nothing there. Also, monitor Link's Y coordinates. Reset the counter to zero if he's on the ground. If Link's Y coordinate decreases, stash the old maximum Y in a variable and check how far below that Y coordinate Link gets each tic, but stop counting if there is a solid combo below him. If the distance between Link's top Y coordinate and current Y coordiante is big enough, and he's never been on a solid combo, set a variable that will damage him when he finally does hit a solid combo.

There ya go, now script it :d

Majora
05-30-2007, 10:01 PM
I will try, thanks! :reading: + :computer: = Link breaking his legs

(if all else fails, I'll mail $5 to your house with a note that says "Write it!" :P)

EDIT: I assume then that a script can affect a whole DMap?

EDIT2: In std.zh, can I edit it so that it says


const int SFX_FALL = ##; //Sound when script is active

in effect adding another SFX that ZC might recognize?

C-Dawg
05-31-2007, 10:10 AM
I think you load SFX into the quest manually using the editor. There's a SFX editor now. Then, just use the number of the SFX you added.

I think.