ghost.zh
#196
Posted 21 December 2012 - 09:01 PM
#197
Posted 21 December 2012 - 09:22 PM
Anyway, simple enough. It's fixed now.
Edit: Nope, I rushed it and screwed it up again. Fantastic.
Now it's fixed. Or you can just fix it in place. update.zh, lines 159-162:
if((__ghzhData[__GH_GLOBAL_FLAGS]&__GHGF_FLICKER)==0 ||
(GH_ENEMIES_FLICKER==0 && (ghost->MiscFlags&10000000b)==0) ||
(GH_ENEMIES_FLICKER!=0 && __Ghost_FlashCounter==0 && (ghost->MiscFlags&10000000b)==0))
Clearly, I should've just made that a separate function, but that'll do for now...
#198
Posted 23 December 2012 - 11:59 PM
#199
Posted 24 December 2012 - 12:05 AM
#200
Posted 24 December 2012 - 12:22 AM
void run(int enemyid){
npc ghost=Ghost_InitAutoGhost(this, enemyid, GHF_WATER_ONLY|GHF_KNOCKBACK|GHF_REDUCED_KNOCKBACK|GHF_STUN|GHF_CLOCK);
int combo=ghost->Attributes[10];
Ghost_Transform(this, ghost, combo, ghost->CSet, 1, 1);
ghost->OriginalTile=GH_BLANK_TILE;
while(true){
Ghost_Waitframes(this, ghost, true, true, 60);
int angle=Angle(Ghost_X, Ghost_Y, Link->X, Link->Y)+Rand(-90, 90);
for(int i=0; i<30; i++){
Ghost_MoveAtAngle(angle, ghost->Step/100, 0);
Ghost_Waitframe(this, ghost, true, true);
}
}
}
}
Here's the script. Very basic enemy, don't see anything in particular that could have caused it. I know you updated ghost for the final build of 2.5 which I haven't upgraded to for reasons (basically I don't want more than one ZC 2.5 build on my computer if I can help it and so I'm waiting until I finish a couple quests before I update). Could that be my problem? Were there bugs with this flag prior to that update?
#201
Posted 24 December 2012 - 12:28 AM
That's the problem. I ran out of bits for flags, so you can't OR them together anymore. You have to do them one by one.
Ghost_SetFlag(GHF_WATER_ONLY);
Ghost_SetFlag(GHF_KNOCKBACK);
Ghost_SetFlag(GHF_REDUCED_KNOCKBACK);
Ghost_SetFlag(GHF_STUN);
Ghost_SetFlag(GHF_CLOCK);
#202
Posted 24 December 2012 - 12:35 AM
That's the problem. I ran out of bits for flags, so you can't OR them together anymore. You have to do them one by one.
Ghost_SetFlag(GHF_WATER_ONLY);
Ghost_SetFlag(GHF_KNOCKBACK);
Ghost_SetFlag(GHF_REDUCED_KNOCKBACK);
Ghost_SetFlag(GHF_STUN);
Ghost_SetFlag(GHF_CLOCK);
I feel dumb now. By ran out of bits do you mean I can't OR them together at all or that there's a cap or how many I can or together and I exceeded it?
#203
Posted 24 December 2012 - 12:39 AM
#204
Posted 24 December 2012 - 07:35 AM
#205
Posted 24 December 2012 - 03:43 PM
PASS 2: PREPROCESSING
PASS 3: BUILDING SYMBOL TABLES
TMP, LINE 239: ERROR S09: VARIABLE _GHI_IN_USE IS UNDECLARED.
TMP, LINE 239: ERROR S10: FUNCTION GHOST_CLEARATTACHEDFFCS IS UNDECLARED.
Tried importing ghost_legacy to see if that would fix the problem, still returning the same error. What am I doing wrong?
Edited by Moosh, 24 December 2012 - 03:44 PM.
#206
Posted 24 December 2012 - 04:25 PM
#207
Posted 24 December 2012 - 04:47 PM
Edit: D'oh! I see what my problem was. I had modified versions of stuff from the old in my actual script buffer. Well shit.
Edit 2: Okay, the update broke all of my autoghost enemies. All of them. I can't help but feel a little grumpy about that since it appears you went to great lengths to maintain backwards compatibility and I have absolutely no clue what's wrong.
Edit 3: Edited global script and now autoghost enemies are appearing at least, but none of them do anything after spawning nor to they visibly take damage or play any death effects.
Edited by Moosh, 24 December 2012 - 10:24 PM.
#208
Posted 04 February 2013 - 07:20 PM
#209
Posted 09 February 2013 - 12:07 PM
Did you get this worked out?
Were you using an existing save? That's all I can think of, offhand.
Degrees/radians issue, probably. It's degrees you want, in this case.
I do wish ZScript were a bit more consistent about that...
#210
Posted 09 February 2013 - 07:18 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users

