PDA

View Full Version : Question about scripts and the Whistle Item



symbiote01
12-04-2010, 05:10 PM
With the script I'm writing, I have several 'songs' that can be played on the ocarina (actually several different items), to have each do a certain function- one is just for the whistle flag, one just for enemies, etc. I can make the script detect when Link is on a whistle trigger flag, and get it to detect Digdogger1 and 3 (the only enemies affected by the whistle, I think?), but can't for the life of me figure out how to trigger the whistle effect without actually having the whistle item in the A or B item slot.

So my questions are: is it possible to trigger the whistle effect from a script; and how?

I'm starting to get the hang of scripting, but sometimes things just stump me. And if this is a stupid question and should be obvious, please indulge my ignorance?

Saffith
12-04-2010, 05:43 PM
Flags are easy enough - just call Screen->TriggerSecrets(), and set Screen->State[ST_SECRET]=true first if you want them to be permanent.

As for Digdogger, I don't think there's anything you can do there except kill it and create the kids yourself. Not too hard, but it'll stay dead even if you don't kill the kids. I think the best thing to do is write an FFC script that creates a Digdogger and remembers whether it's really dead, and use that instead of placing them like other enemies.

If you want it to freeze while Link's playing, load two FFCs and set them to use combos with the two screen freeze types.

symbiote01
12-11-2010, 07:20 PM
Thanks! I got it working, finally.
Instead of creating a handfull of FFCs for screenfreezes and whatnot: I just had the script remember what the ComboType was at position 1,1; change it to a screenfreeze type for the duration of the song; then change it back afterwards(in case it was important). I figured, whatever is in position 1,1 can wait for the song to end like everything else, dammit!
Getting the FFC to figure out whether Digdogger had in fact been killed, instead of Link dying or leaving the screen, then returning... that took my brain a bit to work out.

With my current version of the script, I can trigger secrets/open doors based on specific combo- if Link is standing on the combo 12345, for example, only the 'Song of Pickles' item will trigger the secrets in the room. If you use the 'Song of Monotones' instead, the combo isn't triggered. If I wanted, I could have a different song to get into each dungeon, ala OoT and later games. I LOVE scripts!

Now I just need to find some other use for these songs... one triggers warp secrets (instead of whirlwinds), one summons epona, one kills digdogger, one opens a specific door... what else to do?

Saffith
12-12-2010, 02:00 AM
Thanks! I got it working, finally.
Instead of creating a handfull of FFCs for screenfreezes and whatnot: I just had the script remember what the ComboType was at position 1,1; change it to a screenfreeze type for the duration of the song; then change it back afterwards(in case it was important). I figured, whatever is in position 1,1 can wait for the song to end like everything else, dammit!
That works, but there's a drawback to doing it that way. Press F6 and continue while Link's still playing, and it'll remember the change and freeze the game whenever that combo appears. Saving's safe, though.