Jump to content

Photo

ghost.zh


  • Please log in to reply
645 replies to this topic

#331 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 17 January 2014 - 01:36 PM

Really? wat  does the frame argument in DrawCombo do?

DrawCombo(int layer, int x, int y, int combo, int w, int h, int cset, int xscale, int yscale, int rx, int ry, int rangle, int frame, int flip, bool transparency, int opacity);


#332 Saffith

Saffith

    IPv7 user

  • Members

Posted 17 January 2014 - 04:13 PM

Nothing. It's never even read.
  • Avaro likes this

#333 Avaro

Avaro

    >w<

  • Members

Posted 26 January 2014 - 02:08 PM

The ghost.zh main file appears to have no line breaks for me. Yet, it does compile fine, so the editor still distinguishes between comments and actual script.

#334 anikom15

anikom15

    Dictator

  • Banned
  • Real Name:Westley
  • Location:California, United States

Posted 26 January 2014 - 06:51 PM

That's because there are line breaks, but they are UNIX-style and so don't show up right in certain editors like Notepad.

#335 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 27 January 2014 - 11:58 AM

Copy and paste into word. Copy and paste from word back into notepad. Problem solved. ;)



#336 Saffith

Saffith

    IPv7 user

  • Members

Posted 30 January 2014 - 03:07 PM

Sorry about that. My IDE lost the line break setting somehow. It should be fixed now.
I fixed a couple of bugs, too:
- AutoGhost no longer runs when ghost.zh is suspended
- Large enemies should no longer try to walk into walls when using four-way walking functions
- FindUnusedFFC is aware of GH_INVISIBLE_COMBO now
- The exploding death animation should no longer cause errors if the enemy fails to stay alive for the duration of the animation
- And it no longer stops the enemy from dropping an item

#337 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 30 January 2014 - 06:48 PM

What do you mean by ghost.zh being suspended?



#338 Saffith

Saffith

    IPv7 user

  • Members

Posted 30 January 2014 - 06:50 PM

After you call SuspendGhostZHScripts(), I mean.

#339 Moosh

Moosh

    The Mush

  • Moderators

Posted 30 January 2014 - 07:30 PM

So wait, you can suspend ghost? Does SuspendGhostZHScripts() suspend all scripts using ghost.zh, just the ghost.zh functions, or just the stuff in the global?



#340 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 30 January 2014 - 08:17 PM

I love it when you update this Saffith.

YOU THE MAN NOW DAWG!



#341 Saffith

Saffith

    IPv7 user

  • Members

Posted 30 January 2014 - 08:44 PM

So wait, you can suspend ghost? Does SuspendGhostZHScripts() suspend all scripts using ghost.zh, just the ghost.zh functions, or just the stuff in the global?

Everything but drawing, effectively. Global functions won't do anything and Ghost_Waitframe functions won't return. It's meant to be used when you freeze the screen; I don't think it's useful for much else.

#342 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 06 February 2014 - 04:32 AM

Is that how the GhostClock function works then.



#343 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 08 February 2014 - 05:04 PM

I have a swarm of eyeballs and need to movethem around with ghost movement functions. Can this be done somehow?

Also the main enemy is larger.



#344 Saffith

Saffith

    IPv7 user

  • Members

Posted 10 February 2014 - 11:54 AM

Is that how the GhostClock function works then.

Yep. Functions that handle freezing don't return until it wears off.
 

I have a swarm of eyeballs and need to movethem around with ghost movement functions. Can this be done somehow?
Also the main enemy is larger.

If giving them their own scripts isn't an option, you could run a single instance of a script that would do nothing but move them. Something like this:

ffc script EyeMover
{
    void run()
    {
        npc eye;
        npc invalidNPC; // Never set
        
        // Use a temporary npc for Ghost_Init
        eye=Screen->CreateNPC(NPC_EYE);
        Ghost_Init(this, eye);
        eye->X=1024;
        
        while(this->Misc[0]==0)
        {
            for(int i=1; i<=Screen->NumNPCs(); i++)
            {
                eye=Screen->LoadNPC(i);
                if(eye->ID!=NPC_EYE)
                    continue;
                Ghost_X=eye->X;
                Ghost_Y=eye->Y;
                // Movement commands stored in npc->Misc
                Ghost_Move(eye->Misc[0], eye->Misc[1], 0);
                eye->X=Ghost_X;
                eye->Y=Ghost_Y;
            }
            
            // Ghost_WaitframeLight does not require a valid npc
            Ghost_WaitframeLight(this, invalidNPC);
        }
    }
}


#345 Mero

Mero

    Touch Fluffy Tail

  • Banned
  • Real Name:Tamamo No Mae
  • Location:Rainbow Factory

Posted 27 March 2014 - 10:20 PM

Hey Saffith, any chance you could change the way EWI_X and EWI_Y work. In theory a weapon cannot move offscreen without dying anyways. So you simply store them in the same index. Just a thought.


Edited by Zecora, 28 March 2014 - 11:34 AM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users