Jump to content

Photo

Ghosted enemies are invisible when not using GH_INVISIBLE_COMBO


  • Please log in to reply
4 replies to this topic

#1 Mitchfork

Mitchfork

    no fun. not ever.

  • Contributors
  • Real Name:Mitch
  • Location:Alabama

Posted 08 November 2020 - 11:16 PM

ZC 2.55, a83, b52

 

I am updating some old Ghost scripts of mine and most of them use the default enemy times.  I finally got to one that didn't and the enemy was totally invisible.  The script was working otherwise (enemy could be hit, was hitting me, and appeared to be performing the right actions), but as part of the script I also had a "Game->PlaySound(sound);" statement which was not working.

 

I stripped back a lot of things one-by-one and I finally got to the simplest script I could think of...

import "std.zh"
import "ghost.zh"

import "myscripts/eknock/enemies/z4zol.z"

global script active{
	void run(){
		InitializeGhostZHData();
		//eknockSetup();
		while(true) {
			UpdateGhostZHData();
            UpdateEWeapons();
            CleanUpGhostFFCs(); // Only needed if __GH_USE_DRAWCOMBO is 0
			Waitdraw();
			AutoGhost();
			Waitframe();
		}
	}
}

and z4zol.z:

ffc script TestGhost {
    void run(int enemyID) {
        npc ghost = Ghost_InitAutoGhost(this, enemyID);
        Ghost_SetFlag(GHF_NORMAL);
        while(true) {
			Ghost_Waitframe(this, ghost, true, true);
		}
	}
}

If I configure the enemy in the editor to use GH_INVISIBLE_COMBO (Misc. Attr. 11 = -1) then the enemy appears (and does nothing of course).  If I change Misc. Attr. 11 to anything else, the enemy is invisible, but still there (you can run into it and kill it).

 

I have tried reloading all of my /headers folder from a clean, as downloaded version of ZC but didn't change anything.  I did check GH_INVISIBLE_COMBO and it's 1 (valid) and GH_BLANK_TILE and it's 65456 (valid).  I have also traced ghost->Tile, this->Combo, and Ghost_Data... nothing seems off.

 

I have also posted the .qst file.  You'll have to manually add the above to the buffer.  The enemy I've been using to test is "!Zol, Green (Z4)".  Thanks for any input on this.

 

 

EDIT: Link removed.


Edited by Ebola Zaire, 10 November 2020 - 09:14 AM.


#2 Gégé

Gégé

    Senior

  • Members
  • Real Name:Gérard
  • Location:France

Posted 09 November 2020 - 04:05 AM

Have you set the script slot in Misc Attr. 12 ?



#3 Mitchfork

Mitchfork

    no fun. not ever.

  • Contributors
  • Real Name:Mitch
  • Location:Alabama

Posted 09 November 2020 - 08:44 AM

Yes - like I said, the script is executing and I can trace or add code just fine - It's simply invisible (and mute) when I try to use the FFC combo for enemy graphics.

#4 Gégé

Gégé

    Senior

  • Members
  • Real Name:Gérard
  • Location:France

Posted 09 November 2020 - 09:01 AM

I don't know correctly Ghost.
if it helps, there is this from ghost 2.8.0
 

global script GhostZHActiveScript
{
    void run()
    {
        StartGhostZH();
        
        while(true)
        {
            UpdateGhostZH1();
            Waitdraw();
            UpdateGhostZH2();
            Waitframe();
        }
    }
}

  • Mitchfork likes this

#5 Mitchfork

Mitchfork

    no fun. not ever.

  • Contributors
  • Real Name:Mitch
  • Location:Alabama

Posted 09 November 2020 - 10:59 AM

Oh, that's almost definitely it now that I take a look.  Can't test 'til later but I adapted my global script from a version of Ghost circa 2013 and it looks like the update functions have broadened since then - I'm definitely not capturing everything that's here.  It's kind of a miracle that it didn't cause other issues before now.  Thanks!

 

EDIT: This was indeed my problem.  Thanks for looking at it, Gégé.


Edited by Ebola Zaire, 09 November 2020 - 08:09 PM.

  • Gégé and Bagu like this


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users