Jump to content

Photo

ghost.zh


  • Please log in to reply
645 replies to this topic

#556 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 21 August 2016 - 11:28 PM

And you've loaded this FFC script into slot 1?

#557 OmegaX

OmegaX

    Leader of Omega GamingHunters101

  • Members
  • Real Name:Matthew
  • Location:Rochester, NY

Posted 21 August 2016 - 11:56 PM

Yes



#558 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 22 August 2016 - 12:12 AM

When you say it wasn't moving, do you mean it isn't doing anything, or just not walking? Is it still doing its other attacks?

#559 OmegaX

OmegaX

    Leader of Omega GamingHunters101

  • Members
  • Real Name:Matthew
  • Location:Rochester, NY

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 Saffith

Saffith

    IPv7 user

  • Members

Posted 22 August 2016 - 10:33 AM

Did you continue an existing save after adding ghost.zh? Any saved games would become invalid, so you have to start a new game.

#561 OmegaX

OmegaX

    Leader of Omega GamingHunters101

  • Members
  • Real Name:Matthew
  • Location:Rochester, NY

Posted 22 August 2016 - 11:14 AM

I have tried to start a new game but that didn't work.



#562 Saffith

Saffith

    IPv7 user

  • Members

Posted 22 August 2016 - 11:25 AM

Hm. If you enable level 4 cheats and turn on Cheat -> Show/Hide Layer -> Current FFC Scripts, does the script show up? Are any errors logged in allegro.log?

#563 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 22 August 2016 - 11:37 AM

By walk in place do you mean it's having a spasm on the spot? In other words changing direction randomly very fast and not moving.
If so, I bet if you remove Ghost_ConstantWalk4() and use Ghost_Move() instead it'll work.

#564 OmegaX

OmegaX

    Leader of Omega GamingHunters101

  • Members
  • Real Name:Matthew
  • Location:Rochester, NY

Posted 22 August 2016 - 06:44 PM

it just walks in place in one direction



#565 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

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 Saffith

Saffith

    IPv7 user

  • Members

Posted 26 August 2016 - 12:09 PM

There's a mistake slightly above the bit you quoted...
        // Half a tile off vertically
        {
            // Fix direction
That's supposed to be
        // Half a tile off vertically
        else if(Ghost_Y%16==8)
        {
            // Fix direction
Try 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 OmegaX

OmegaX

    Leader of Omega GamingHunters101

  • Members
  • Real Name:Matthew
  • Location:Rochester, NY

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 Saffith

Saffith

    IPv7 user

  • Members

Posted 29 August 2016 - 02:17 PM

It takes different arguments. I don't think there's anything wrong with Ghost_ConstantWalk4() there, though. It sounds more like the script isn't running at all or is quitting prematurely for some reason.

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 OmegaX

OmegaX

    Leader of Omega GamingHunters101

  • Members
  • Real Name:Matthew
  • Location:Rochester, NY

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 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 30 August 2016 - 06:31 AM

There's a mistake slightly above the bit you quoted...

        // Half a tile off vertically
        {
            // Fix direction
That's supposed to be
        // Half a tile off vertically
        else if(Ghost_Y%16==8)
        {
            // Fix direction
Try 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