Yes. Thank you muchly.
Later-game Gibdo
#16
Posted 03 March 2014 - 03:33 PM
#17
Posted 07 April 2014 - 11:43 AM
Question:
If I wanted multiple different kinds of Gibdo enemy, would I just duplicate the script, and change the constants' names and values?
#18
Posted 07 April 2014 - 11:56 AM
Yes, that should work. There are better ways of doing it, though.
The optimal solution would be an AutoGhost script, but those take some effort to make.
A "compromise" solution would be to change the constants to parameters in the latest version of the script:
import "std.zh" //D0: Enemy to burn //D1: Enemy to spawn ffc script Burnable_Gibdo{ void run(int gibdo, int skeleton){ while(true){ for(int i = 1; i < Screen->NumNPCs(); i++){ //Check every enemy npc enem = Screen->LoadNPC(i); if(enem->ID == gibdo){ //If it's a gibdo2 for(int j = 1; j < Screen->NumLWeapons(); j++){ //Check every weapon lweapon weap = Screen->LoadLWeapon(j); if(weap->ID == LW_FIRE && Collision(enem, weap)){ //If it's fire and touching the gibdo npc newEnem = CreateNPCAt(skeleton, enem->X, enem->Y); //Create the skeleton newEnem->HP = enem->HP; //Set its HP to gibdo's HP (optional; can remove this) Remove(enem); //Remove gibdo quietly } } } } Waitframe(); } } }
If you have more than one type of gibdo on one screen, just place two instances of this FFC script on that screen.
- SparksTheUnicorn likes this
#19
Posted 09 April 2014 - 03:13 PM
I also reworded vars to specify any initial enemy, and any replacement enemy, changing the ints to reflect that use. You could use it for a multi-stage enemy, like a boss, or for normal enemies. Nothing original by itself, but it can make for a very cool enemy design, as you can layer this FFC so that when the new enemy appears, it has different weaknesses, to set up a boss fight.
You could further improve this version by setting up larger sprites for a boss, via the FFC, should you desire.
Edited by ZoriaRPG, 09 April 2014 - 03:27 PM.
- SparksTheUnicorn likes this
#20
Posted 16 April 2014 - 07:02 AM
Yes, that should work. There are better ways of doing it, though.
The optimal solution would be an AutoGhost script, but those take some effort to make.
A "compromise" solution would be to change the constants to parameters in the latest version of the script:
import "std.zh" //D0: Enemy to burn //D1: Enemy to spawn ffc script Burnable_Gibdo{ void run(int gibdo, int skeleton){ while(true){ for(int i = 1; i < Screen->NumNPCs(); i++){ //Check every enemy npc enem = Screen->LoadNPC(i); if(enem->ID == gibdo){ //If it's a gibdo2 for(int j = 1; j < Screen->NumLWeapons(); j++){ //Check every weapon lweapon weap = Screen->LoadLWeapon(j); if(weap->ID == LW_FIRE && Collision(enem, weap)){ //If it's fire and touching the gibdo npc newEnem = CreateNPCAt(skeleton, enem->X, enem->Y); //Create the skeleton newEnem->HP = enem->HP; //Set its HP to gibdo's HP (optional; can remove this) Remove(enem); //Remove gibdo quietly } } } } Waitframe(); } } }If you have more than one type of gibdo on one screen, just place two instances of this FFC script on that screen.
You know, 'cos I can't get global scripts to work (at all), and this is the most simple alternative, I think I'll use it. Sorry, ZoriaRPG, but that looks way too big, and I only need the burning one. It's useful to anyone else who needs it, though, so thanks.
Thanks fot the one I'm using, MoscowModder
#21
Posted 02 June 2020 - 12:03 AM
Just adding some spice to this, combining it with the generic FFC trigger by grayswandir. This version can be set to react to either a specific weapon class (LW_Type), or a specific item (using the item editor, item ID number):
I also reworded vars to specify any initial enemy, and any replacement enemy, changing the ints to reflect that use. You could use it for a multi-stage enemy, like a boss, or for normal enemies. Nothing original by itself, but it can make for a very cool enemy design, as you can layer this FFC so that when the new enemy appears, it has different weaknesses, to set up a boss fight.
You could further improve this version by setting up larger sprites for a boss, via the FFC, should you desire.
Will this work in 2.55?
Edited by SparksTheUnicorn, 02 June 2020 - 12:04 AM.
#22
Posted 02 June 2020 - 06:36 AM
Will this work in 2.55?
That script isn't needed in 2.55. What it does, is built into the Generic combo type.
#23
Posted 02 June 2020 - 01:03 PM
That script isn't needed in 2.55. What it does, is built into the Generic combo type.
How can I use generic combos for having enemies change forms tho?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users