ghost.zh
#556
Posted 21 August 2016 - 11:28 PM
#557
Posted 21 August 2016 - 11:56 PM
Yes
#558
Posted 22 August 2016 - 12:12 AM
#559
Posted 22 August 2016 - 12:25 AM
It just walked in place and it wasn't doing any attacks at all
Edited by MegaX, 22 August 2016 - 12:25 AM.
#560
Posted 22 August 2016 - 10:33 AM
#561
Posted 22 August 2016 - 11:14 AM
I have tried to start a new game but that didn't work.
#562
Posted 22 August 2016 - 11:25 AM
#563
Posted 22 August 2016 - 11:37 AM
If so, I bet if you remove Ghost_ConstantWalk4() and use Ghost_Move() instead it'll work.
#564
Posted 22 August 2016 - 06:44 PM
it just walks in place in one direction
#565
Posted 26 August 2016 - 06:28 AM
Currently its possible as a player to distinguish ghosted 4-way walkers from non-scripted enemies by knocking them back. Ghosted enemies kinda glitch around when knocked back. Was that fixed?
So, I found out why this is happening and what part of ghost.zh needs a change but I'm in need of help to change this.
The way it works is that after ghosted 4-way walkers are being knocked back into a wall the enemy is not aligned to the grid anymore and will snap to the grid whenever they get the chance to turn. This is from ghost.zh:
if(walkCounter==0) { // Snap to the grid and possibly turn __Ghost_FixCoords(); walkCounter=Floor(16/step); if(counter==-1) { __Ghost_NewDir4(rate, homing, hunger); // Halt? if(Rand(16)<haltRate) { if(!ftmSet) Ghost_UnsetFlag(GHF_FULL_TILE_MOVEMENT); haltCounter=haltTime; return haltCounter; } } }
I want to make it so it normally walks back into the grid before getting the chance to turn and not being teleported into the grid. That's how regular enemies do it. Can someone change this for me without breaking ghost.zh? xD
Edited by Avataro, 26 August 2016 - 07:56 AM.
#566
Posted 26 August 2016 - 12:09 PM
// Half a tile off vertically { // Fix directionThat's supposed to be
// Half a tile off vertically else if(Ghost_Y%16==8) { // Fix directionTry setting the flag GHF_FULL_TILE_MOVEMENT, too.
They do seem a bit off even with that, though... I'll have to look into that.
- Avaro likes this
#567
Posted 29 August 2016 - 02:05 PM
I try to use Ghost_Move () but the script doesn't want to import. here's what it said.
PASS 1: PARSING
PASS 2: PREPROCESSING
PASS 3: BUILDING SYMBOL TABLES
PASS 4: TYPE-CHECKING/COMPLETING FUNCTION SYMBOL TABLES/CONSTANT FOLDING
FFC SCRIPT MEGAXBOSS.Z, LINE 15: ERROR T21: COULD NOT MATCH TYPE SIGNATURE
GHOST_MOVE (FLOAT, FLOAT, FLOAT, FLOAT, FLOAT).
#568
Posted 29 August 2016 - 02:17 PM
If you enable level 4 cheats and turn on Cheat -> Show/Hide Layer -> Current FFC Scripts, does the script show up, even for a single frame? Are any errors logged in allegro.log?
#569
Posted 29 August 2016 - 02:25 PM
okay now it works but the enemy isn't walking properly
Edited by MegaX, 30 August 2016 - 11:23 PM.
#570
Posted 30 August 2016 - 06:31 AM
There's a mistake slightly above the bit you quoted...
// Half a tile off vertically { // Fix directionThat's supposed to be// Half a tile off vertically else if(Ghost_Y%16==8) { // Fix directionTry setting the flag GHF_FULL_TILE_MOVEMENT, too.
They do seem a bit off even with that, though... I'll have to look into that.
That fix actually made it much better. Thanks. At least it doesn't get snapped into completely off locations now.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users