My Script Wishlist and Your Script Ideas
#91
Posted 08 June 2015 - 09:27 AM
#92
Posted 08 June 2015 - 10:11 AM
@Moosh- Some tips on setting up your Lanmola script would be appreciated.
Current Setup-
Enemy Name- Diving Lanmola.
Misc 1- Enemy 184.
Misc 2- 5 segments.
Misc 3 to 6- Zero.
Misc 7- Rock sprite.
Misc 11- First tile of boss graphics.
Misc 12- Script number.
Tiles- All head tiles in order, then all tail tiles in order. First tile of main enemy is invisible.
This sounds right except 11 should be an invisible combo not a tile.
http://www.mediafire...Lurrnmurrla.qst
Here's my test file for the enemy if you want to look through the enemy setup. It requires ghost.zh and the autoghost global script to work, so be sure you have that set to your global slot.
- ywkls likes this
#93
Posted 08 June 2015 - 10:47 AM
@Lejes- It took a little research to figure out how to set up the eweapon the way that I wanted, but it is now being produced correctly and does damage my character. The problem is that it does way too much damage. (Like 4 to 5 hearts if I have no rings.)
Edit: Figured out what was wrong. My arguments were in the wrong order. Corrected code appears below. Updating database entry to match.
Here's the revised code.
@Moosh- Thanks for the example quest! I'll definitely look it over, because right now all that's happening when I enter the room is the secrets are being triggered as though the enemy is dead.
Edit: Silly me! I forgot to set enemy type to "Other'! It took a little more effort to figure a few other things out, but now it is working fine. I'm definitely giving you credit for this fine achievement.
Edited by ywkls, 06 September 2015 - 10:03 PM.
#94
Posted 21 June 2015 - 08:31 AM
A note to those who have been following this topic. If you wish to aid with any script request that I have, please check the original post in this topic. From now on, whenever I have a current script request; I'll post a link to the topic which discusses the script request there. Many of these requests will be based on some of the ideas that I've discussed here that I've tried to implement but haven't been successful with yet.
Of course, no one is obligated to script these; but any suggestions on methods that would work for the ideas that I'm trying to carry out would be appreciated. If you have something to contribute, please post those replies in the appropriate topic since I'm reserving this one for new script ideas and mostly completed scripts, like some of the enemies that I've been trying to create.
Thanks to everyone who has aided me in seeing how to bring my wild concepts to life and who might do so in the future!
#95
Posted 26 June 2015 - 07:02 PM
Alright, I'm trying to modify one of the scripted enemies that I've posted here to fire an eweapon, but once again my unfamiliarity with the methodology used by ghost.zh has defeated me. First, the code; then what I'm trying to do.
I've tried a few other Eweapon movement patterns without any luck. I know that with my Blind the Thief script, the fireballs appeared onscreen in a trail because between the time that they were generated and the point that they vanished, their position had changed. I'm thinking that what I need to do here is have a function that is activated when the boss surrounds you that over a period of one or two seconds, continually produces this weapon and has it move away from the boss and towards Link.
Speaking of my recently scripted enemies, I've been trying to determine just how you change the combo or tile being used by the boss while it is running. I have several bosses that do this along with changing defenses and I haven't been able to find anything that could help me figure out how to do this. Thanks for any advice!
Edited by ywkls, 06 September 2015 - 10:04 PM.
#96
Posted 26 June 2015 - 10:23 PM
That's because you gave it 1 step speed. 100 or more would be a more reasonable value. The scale ghost.zh uses for step speed isn't consistent between functions, and it's annoying, but what can you do.
- ywkls likes this
#97
Posted 26 June 2015 - 10:41 PM
I also tried it with a step speed of 300, but it did the same thing.... I'm in the process of updating the scripts I've posted here with Autoghost. So far, the Nightmare, Agahnim and now Big Moldorm all support it.
I could get Blind the Thief to support it too if I knew how to change his appearance from one state to another...
@Lejes- I wanted to thank you specifically for that Ghost.zh tutorial you posted. It has helped simplify a lot of things I've tried to learn how to do with that. As it stands right now, I'm sure I'm not alone when I say that I'd appreciate any further clarification that you can offer on the mysteries of ghost.zh.
#98
Posted 26 June 2015 - 10:56 PM
You can change the enemy graphics with Ghost_Data, if it uses a combo, or just use npc->Tile as usual if it's not using ghost.zh's combo drawing feature. Ghost.zh has a few functions for enemy vulnerabilities, but mostly you're going to be using the npc->Defense[] array like you would for non-ghosted enemies.
#99
Posted 26 June 2015 - 11:53 PM
Okay, I'm pretty sure I'm missing an essential step here somewhere...
When I set attribute 11 to negative one, use the built-in graphics ahd try to change the n->Tile, it doesn't alter. But when I use the combo number at attribute 11, the stupid thing doesn't even appear; much less change form. (It is still there, shooting fireballs at me. I just can't see it.)
The script above is one of my tries to incorporate the changing of the appearance. I don't know if my mistake is in using a global constant rather than something set inside the script like I've seen elsewhere or what. I suspect that the command I need to utilize to make the combo appear correctly is Ghost_Transform, although other scripts I've seen just use a set up like this.
In the Goriya (LTTP) script...
So, I know it can be done. Now I just need to work out how...
Edited by ywkls, 06 September 2015 - 10:05 PM.
#100
Posted 27 June 2015 - 01:11 AM
I'm giving up on the whole, 'lightning bolt that goes up and down as it moves' idea, since that requires a function that would reproduce sine wave movement. (Using the built-in function SetEWeaponMovement makes it bounce up and down, but still go in a straight line. Weird...)
Here's what probably going to be the last version of my Agahnim script, which I'll be submitting to the database soon.
The placement of the lightning bolt is a little off and they can linger on screen for a while, but mostly it works like I intended.
Edited by ywkls, 06 September 2015 - 10:05 PM.
#101
Posted 27 June 2015 - 01:49 AM
First of all: start a new save file. Using an existing one can cause issues if new global script variables are introduced. Secondly, it was my mistake on suggesting npc->Tile. It looks like you have to change npc->OriginalTile instead. As for the combo issues, what tile does your combo 1 use? That's the default value of GH_INVISIBLE_COMBO, and as its name implies, it should be invisible. But not just a single tile of invisible. Its tile needs to be the top left of a 4 by 4 space of blank tiles. Even enemies smaller than 4 by 4 will have messed up graphics if you don't do that. If I don't have that in the tutorial, I need to add it. The reason you have to do it is pretty obscure and most tilesets don't have combo 1 set to something suitable by default. Also, for any enemy that isn't 1 by 1, you'll need to set Ghost_TileHeight and GhostTileWidth in the beginning of the script. Ghost_Transform is just a way of setting various values like these and combo in one function. I don't like using it because it means I have to go look up what order its arguments go in every time.
I'm not sure what issue you're having with the sine wave. Bouncing up and down around a straight line path is literally what sine waves do.
A quick script I made to produce sine wave fireballs. Ex1 fires them, Ex2 increases angle, Ex3 decreases angle. You could try playing with the parameters on this and see if something matches the movement you had in mind. If you stick with the current plan, I recommend adding some Ghost_Waitframe to Agahnim's lightning sequence, because they all just come out instantly now. And remember that angles are in radians, not degrees, if any of your modified scripts still use the angle arguments.
#102
Posted 27 June 2015 - 09:28 AM
@Lejes- Thanks for the tip on changing the boss's appearance. Still don't know how to use the ghost.zh variables and functions properly, but I'm working on it. I've been able to apply your suggestion on using the npc's original tile to change how it looks but now a really strange bug has appeared. It has suddenly gained the ability to walk through walls.
Here's the modified code.
Except for making this enemy use ghost.zh, nothing about it has changed. Any idea what's going on?
It should be noted that this occurred during my tests of code where the boss didn't change appearance properly, but was still being run by ghost.zh.
Edited by ywkls, 06 September 2015 - 10:06 PM.
#103
Posted 27 June 2015 - 03:09 PM
Replace all instances of Waitframe(); with Ghost_Waitframe(this, n, false, false);. You can call Ghost_Deathanimation(this, n, 1); when the boss has 0 or less HP. Ghosted enemies need the Ghost_Waitframe function to update properly.
FireAimedEWeapon(n2->Weapon, n2->X, n2->Y, angle, 1, n2->WeaponDamage, sprite, sound, EWF_ROTATE)
I'm not sure what the purpose of angle here is. FireAimedEWeapon already fires it directly at Link by default. Using the angle argument is actually an offset from a direct shot. It doesn't make much sense here, anyway, because the angle would need to be in radians and it looks like this one is degrees. Step speed also needs to be much higher because it basically won't move with 1.
- ywkls likes this
#104
Posted 27 June 2015 - 03:19 PM
Okay, here's a new one. This one originally had the bug where it walked through walls occasionally, but now that seems to have gone away. I think it was caused by some of the wall combos not being "No Enemy" type, but changing that hasn't kept my Blind the Thief script from walking through walls.
I'd like to improve this script, where the circling foes are all on different sides of the main enemy. Ideally, one would start at the left, another below and the third at the right. Then all three would circle the center at the same rate; but always be on different sides of the main foe. Any ideas on how to do that would be useful.
Replace all instances of Waitframe(); with Ghost_Waitframe(this, n, false, false);. You can call Ghost_Deathanimation(this, n, 1); when the boss has 0 or less HP. Ghosted enemies need the Ghost_Waitframe function to update properly.
These enemies are technically only partially ghosted, since their enemy type isn't Other. I suppose I could make them fully ghosted, once I learn how.
FireAimedEWeapon(n2->Weapon, n2->X, n2->Y, angle, 1, n2->WeaponDamage, sprite, sound, EWF_ROTATE)I'm not sure what the purpose of angle here is. FireAimedEWeapon already fires it directly at Link by default. Using the angle argument is actually an offset from a direct shot. It doesn't make much sense here, anyway, because the angle would need to be in radians and it looks like this one is degrees. Step speed also needs to be much higher because it basically won't move with 1.
Angle is a required argument for that function. (Don't know why, it just is.) In the Blind the Thief script, it is constant being changed, creating a fire trail behind the circling heads. I'm not sure what having the speed set to something other than one would do. I'll have to try it and find out.
Edit- Holy guacamole! In the example of the Blind the Thief script, setting the step speed to a measly 100 causes it to spew a spiraling wave of fireballs out from the circling heads. At 300, the room is filled with fireballs going in widening spirals. I guess somebody might want that feature, but not me.
Edited by ywkls, 06 September 2015 - 10:07 PM.
#105
Posted 27 June 2015 - 06:30 PM
Oh, you don't want the fireballs to move at all. In that case, you would leave step at 0 and the angle is completely irrelevant. Still good to keep "radians, not degrees" in mind for the future. And there's no such thing as partially ghosted. If you use a ghost initialization function, the enemy has the ghost flag marked on its Misc array and ghost.zh will handle a lot of stuff for it. Even if you use default movement, Waitframe should never, ever be used in any FFC script where you used a ghost initialization function.
Getting the circling things out of phase is easy enough. Just replace "angle" with "angle + x" in any of the n->X and Y expressions. With x being how much you want it offset. angle, angle + 90, and angle + 180 would be the positions you listed out.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users

