Edited by blackbishop89, 17 August 2011 - 01:33 PM.
ghost.zh
#61
Posted 17 August 2011 - 01:33 PM
#62
Posted 17 August 2011 - 05:25 PM
const int SLM_COMBO = 3820; //Slime combo
const int SLM_SOUND = 0; //Sound when the slime shoots a smaller slime
const int SLM_ZOL = 180; //ID of the Zol to spawn
const int SLM_EXPLODE = 0; //Sound when slime explodes
const int SLM_ENEMYID = 183; //ID of enemy to use for ghosted enemy
ffc script slimeBoss{
void run(){
npc ghost = Ghost_InitWait(this,1,true);
int frames;
int angleRand;
eweapon wpn;
while(true){
frames++;
if(frames%120 == 0){
angleRand = Rand(360);
wpn = FireAimedEWeapon(EW_SCRIPT1,CenterX(this),CenterY(this),DegtoRad(angleRand),50,4,SLM_BALL,SLM_SOUND,EWF_SHADOW);
SetEWeaponMovement(wpn,EWM_THROW,Rand(25,60)/10);
SetEWeaponDeathEffect(wpn,EWD_VANISH,0);
wpn = FireAimedEWeapon(EW_SCRIPT1,CenterX(this),CenterY(this),DegtoRad(angleRand+45),50,4,SLM_BALL,SLM_SOUND,EWF_SHADOW);
SetEWeaponMovement(wpn,EWM_THROW,Rand(25,60)/10);
SetEWeaponDeathEffect(wpn,EWD_VANISH,0);
wpn = FireAimedEWeapon(EW_SCRIPT1,CenterX(this),CenterY(this),DegtoRad(angleRand-45),50,4,SLM_BALL,SLM_SOUND,EWF_SHADOW);
SetEWeaponMovement(wpn,EWM_THROW,Rand(25,60)/10);
SetEWeaponDeathEffect(wpn,EWD_VANISH,0);
}
slimeWaitFrame(this,ghost);
}
}
void slimeWaitFrame(ffc this, npc ghost){
eweapon wpn;
Ghost_Waitframe2(this,ghost,true,true);
this->X = ghost->X;
this->Y = ghost->Y;
if(Ghost_GotHit()){
wpn = FireAimedEWeapon(EW_SCRIPT1,CenterX(this),CenterY(this),0,50,4,SLM_BALL,SLM_SOUND,EWF_SHADOW);
SetEWeaponMovement(wpn,EWM_THROW,Rand(25,60)/10);
SetEWeaponDeathEffect(wpn,EWD_SPAWN_NPC,SLM_ZOL);
if(Ghost_HP < 100){
Ghost_Explode(this,ghost);
}
}
}
}
The problem I'm having is that the FFC will not stick to the enemy like I was intending. So, to temporarily remedy this, I just forcefully put the FFC there, but I'm not sure if this could potentially break things. It's probably something I overlooked.. DX Any advice?
#63
Posted 17 August 2011 - 11:18 PM
So saffith do you think you'll be able to give us a better function to reproduce moldorm movement? Me and Colossal need it for a project we're working on together.
I don't know. It depends on whether I can find the code for it and whether it's something that can be duplicated reasonably well. I suspect it's actually another canmove restriction; maybe I can think of a way to imitate that.
Another bug. I hate missing things that simple... Should be fixed now.
#64
Posted 17 August 2011 - 11:28 PM
#65
Posted 18 August 2011 - 10:12 PM
Another thing, the homing for 8 way enemies seems to be only 4 way. While built in homing is 8 way for 8 way enemies. Just though I should bring that up.
Edited by blackbishop89, 19 August 2011 - 09:16 AM.
#66
Posted 19 August 2011 - 09:24 AM
That depends. How were you trying to extend it at first?
Yeah, they're kind of weird, but I just copied the built-in functions. They do some odd things sometimes.
#67
Posted 19 August 2011 - 09:26 AM
That depends. How were you trying to extend it at first?
Yeah, they're kind of weird, but I just copied the built-in functions. They do some odd things sometimes.
Just good old Ghost_TileWidth and Ghost_TileHeight. Also tried Ghost_Transform, neither worked.
#68
Posted 19 August 2011 - 09:31 AM
#69
Posted 19 August 2011 - 07:43 PM
Resizing the FFC is the primary purpose of those. It's the hitbox resizing that's secondary, but they should do that, too. Can you give me an example where they're failing?
Like I said, when you use the default enemy graphic from the enemy editor and not a ffc's. In my case it's when I set Attribute 11 to 1. which is my Ghost Invisible Combo. It still extends the ffc though, just not the enemy.
E
EWF_SHADOW: The weapon will cast a shadow if it's Z is greater than 0.
EDIT: 2 Hey saffith, I know this makes me sound stupid but just what is the difference between ConstantWalk and VariableWalk?
EDIT 3: I have a suggestion why not make it so that the enemy graphic is visible while the enemy explodes. May'be store it during Ghost_Waitframe and call it when they explode. This is mainly for enemies where you want to use the graphics from the built in enemy editor and not the combos.
EDIT 4: Another one, when using the built in graphics and not the combo ghost->Dir is not being set. It should.
EDIT 5: It seems that if I use ghostwait frame light and the functions in ghost.txt that are said to be used internally he appears like normal when exploding. So no problems there!
Edited by blackbishop89, 19 August 2011 - 08:04 PM.
#70
Posted 19 August 2011 - 08:28 PM
Okay, I see. I'll fix that.
Constant walk keeps the enemy aligned to the 8x8 grid.
Eh? There's no reason it shouldn't be visible either way. Can you show me how you're using it?
Okay, sure.
#72
Posted 20 August 2011 - 10:34 PM
#73
Posted 21 August 2011 - 07:31 PM
Edited by blackbishop89, 21 August 2011 - 07:32 PM.
#74
Posted 25 August 2011 - 02:09 PM
#75
Posted 25 August 2011 - 04:14 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users