ghost.zh
#211
Posted 09 February 2013 - 07:25 PM
Also, I was wondering how to go about autoghosting the composite npcs.
#212
Posted 12 February 2013 - 12:50 PM
AutoGhost doesn't have any support for segmented enemies. You could modify it or run another function in advance to mark the extra segments. I guess I could add it at some point, but it's a lot of extra code for a few rare special cases.
#213
Posted 13 February 2013 - 04:03 AM
How is it possible to have more than one ghosted enemy per screen given that position and speed are handled by a single set of global variables?
Do I need to replace ALL waitframe() calls in the quest (in other ffcs, global scripts, etc.) with ghost_waitframe or only the ones in the ghost script?
Do I need to make any modifications to my global scripts or is everything handled through ffc scripts?
#214
Posted 13 February 2013 - 04:23 AM
Actually, each enemy is handled by a ffc script that is set up and run automatically.
Nope, just the ones in the ghost scripts.
You just need to add this small bit into your main global loop:
UpdateClock();
CleanUpGhostFFCs();
Waitdraw();
AutoGhost();
#215
Posted 13 February 2013 - 07:34 AM
Did you get this worked out?
Were you using an existing save? That's all I can think of, offhand.
Yeah I solved it myself...and then promptly forgot the lesson I learned and did it again recently. Well now I know why my ghosted enemies stopped working...
You just need to add this small bit into your main global loop:
UpdateClock();
CleanUpGhostFFCs();
Waitdraw();
AutoGhost();
Russ, are you giving out dated information? Because that sure looks like the old global script. The new one changed some things.
{
void run()
{
InitializeGhostZHData();
while(true)
{
UpdateGhostZHData();
UpdateEWeapons();
CleanUpGhostFFCs(); // Only needed if __GH_USE_DRAWCOMBO is 0
Waitdraw();
AutoGhost();
DrawGhostFFCs();
Waitframe();
}
}
}
Edited by Moosh, 13 February 2013 - 07:39 AM.
#216
Posted 13 February 2013 - 09:44 AM
That's part of what Ghost_Waitframe does. The values are saved and restored between frames, so each script effectively has its own copy.
#217
Posted 18 February 2013 - 04:32 PM
#218
Posted 18 February 2013 - 04:56 PM
Russ, are you giving out dated information? Because that sure looks like the old global script. The new one changed some things.
Wait, it got changed? This is news to me. Then again, I haven't updated ghost cuz I don't want any problems popping up at the late stage of development I'm in...
#219
Posted 19 February 2013 - 12:20 AM
Secondly.. um, well, they kinda look like this. It functions perfectly though, it just looks kind of weird. I set everything up right, to my knowledge, but it appears to be using the wrong combos. The upper left part is combo 1660 as defined in the enemy attributes, but the other three are random combos.
EDIT I just changed the empty combo in ghost.zh from 1 to combo 7, and it still does it. Also, when the last Armos is killed, it leaves behind the junk tiles. [pic] I don't -think- it did that the first time, but I don't remember.
Edited by Anthus, 19 February 2013 - 12:36 AM.
#220
Posted 19 February 2013 - 12:50 AM
There's no stopping it; that's hard-coded in ZC. The only thing I can think of to do is make the regular hit sound silent and set a custom hit sound for every single enemy.
It looks like the FFC part is correct and the enemy tile is wrong, which means the problem should be GH_BLANK_TILE. I'm guessing it's 10440. It's drawing a 2x2 sprite directly from the tile page, so the blank tile needs to be the top-left corner of a whole block of blank tiles. Your blank combo should also use a tile like that.
#221
Posted 19 February 2013 - 01:14 AM
There's no stopping it; that's hard-coded in ZC. The only thing I can think of to do is make the regular hit sound silent and set a custom hit sound for every single enemy.
Hm, I might go ahead and do that (I'm hoping it will take all of 10 minutes).
It looks like the FFC part is correct and the enemy tile is wrong, which means the problem should be GH_BLANK_TILE. I'm guessing it's 10440. It's drawing a 2x2 sprite directly from the tile page, so the blank tile needs to be the top-left corner of a whole block of blank tiles. Your blank combo should also use a tile like that.
Okay, I think it is the blank tile parameter. I didn't set that one at all, I only set the combo under "GH_INVISIBLE_COMBO" and the tile number for "GH_SHADOW_TILE". I'll change that to a blank 4x4 grid, and post results. I'm pretty sure that's it though. (btw, by default, it is 65456)
EDIT: Yep, that fixed it, thanks
I also happened to notice that killing the Armos Knights didn't open the shutters. Is there a way to make that work, or do I need to have a "regular" invisible enemy on screen to kill?
Edited by Anthus, 19 February 2013 - 01:20 AM.
#222
Posted 19 February 2013 - 01:53 AM
By the way, I just found a bug in the Armos Knights script. It's been updated. (The one in the database. Signature link's obsolete. I need to fix that...
#223
Posted 19 February 2013 - 02:56 AM
Edit: What's the bug anyway? Other than my tile error, it seemed to work perfectly. However, I was wondering if there is a way to make the enemy move faster? I feel like they're easier to kill in ZC cause you can fire arrows MUCH quicker in Zelda 1 than in ALttP. I feel like if the Knights could go faster it'd make up for that. If not, it's not a big concern, I was just curious to if small tweaks like that are, in fact, small tweaks
Edited by Anthus, 19 February 2013 - 03:04 AM.
#224
Posted 19 February 2013 - 10:10 AM
Try this: enable level 4 cheats and turn on Cheat > Show/Hide Layer > Current FFC Scripts. If it's working correctly, the last copy of the script should disappear when the last knight finishes exploding. If there's still a copy hanging around, it's probably a similar problem.
As for speeding them up, there's no way to do that from ZQuest, but check the constants at the top of the script.
AK_PART_1_ROTATE_SPEED controls how fast the positions in the circle rotate. It's in degrees per frame, so the default value of 1 is one full circle every six seconds.
AK_PART_1_STEP controls how fast the individual knights move. They'll move in strange ways if they can't keep up with the circle.
AK_PART_2_STEP is how fast the last knight moves. If you change that, you may also need to play with AK_PART_2_RISE_DIVISOR, which controls how fast it moves upward relative to their lateral movement.
#225
Posted 20 February 2013 - 02:15 PM
I grabbed the version from the DB, and it works, doors, secrets and all.
EDIT 2 million: Also, I've decided to keep its spped the same, but double its HP to 24 instead of 12. Better bring atleast.. 36 arrows
I was also wondering how you make a different ghost.zh file for another quest for future reference.
Edited by Anthus, 20 February 2013 - 03:08 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users


