Jump to content

Photo

ghost.zh


  • Please log in to reply
645 replies to this topic

#151 SpacemanDan

SpacemanDan

  • Members
  • Location:Ontario, Canada

Posted 22 July 2012 - 08:10 PM

When messing around with the goriya script, if you stun it and continuously walk until it becomes unstunned, it'll teleport to where it would probably have been if it hadn't been stunned in the first place. Any ideas on how to fix this? I tried blocking off what looked like movements if the enemy was stunned but didn't seem to do anything. :S (I tested it on an altered version and someone else tested it with an unaltered version, both producing the same results)

#152 Saffith

Saffith

    IPv7 user

  • Members

Posted 22 July 2012 - 09:08 PM

Well, that's an embarrassing oversight. icon_razz.gif
I don't see any way to fix it without adding a new function, so I've done that. Ghost_WasFrozen(). Here's the updated goriya script:

Code


#153 SpacemanDan

SpacemanDan

  • Members
  • Location:Ontario, Canada

Posted 22 July 2012 - 09:26 PM

Aha, many thanks for that! icon_biggrin.gif

#154 Cereal Guy

Cereal Guy

    Senior

  • Members
  • Location:Concepción, CHL

Posted 28 August 2012 - 02:37 PM

Great, I can use the Armos! YOU'RE GREAT !! icon_freak.gif

#155 SpacemanDan

SpacemanDan

  • Members
  • Location:Ontario, Canada

Posted 04 September 2012 - 09:13 PM

I'm having some problems setting up an enemy to change its combo automatically, based on its direction. Do I just need to set GHF_SET_DIRECTION and the appropriate direction types? I'm using a bat enemy as an underlying enemy for this (so I'm using the 2nd waitframe) if it makes any difference. Nowhere in the code am I trying to set the enemy's combo, so I don't think that's it. I can send you the code if need be. icon_smile.gif

#156 Saffith

Saffith

    IPv7 user

  • Members

Posted 04 September 2012 - 09:34 PM

GHF_SET_DIRECTION just sets Ghost_Dir and npc->Dir. If you want to change the combo, you need GHF_4WAY or GHF_8WAY.

#157 SpacemanDan

SpacemanDan

  • Members
  • Location:Ontario, Canada

Posted 04 September 2012 - 09:41 PM

I actually meant that I had 8WAY set when I mention that I ''Set the appropriate direction types'. The combo isn't changing for me no matter what I try. ):

#158 Saffith

Saffith

    IPv7 user

  • Members

Posted 04 September 2012 - 10:10 PM

Oh, I think I know what the problem is... Some enemies actually use directions from 8-15 instead of 0-7, and I think the bat is one of them.

All right, if you replace the if/else series at line 1060 and the body of the else block at line 3674 with this:
CODE
int tempDir=Ghost_Dir;
if(tempDir>7)
{
    if(tempDir==8) tempDir=DIR_UP;
    else if(tempDir==9) tempDir=DIR_RIGHTUP;
    else if(tempDir==10) tempDir=DIR_RIGHT;
    else if(tempDir==11) tempDir=DIR_RIGHTDOWN;
    else if(tempDir==12) tempDir=DIR_DOWN;
    else if(tempDir==13) tempDir=DIR_LETDOWN;
    else if(tempDir==14) tempDir=DIR_LEFT;
    else if(tempDir==15) tempDir=DIR_LEFTUP;  
}

if(Ghost_FlagIsSet(GHF_8WAY))
    this->Data=Ghost_Data+VBound(tempDir, 7, 0);
else if(Ghost_FlagIsSet(GHF_4WAY))
    this->Data=Ghost_Data+VBound(tempDir, 3, 0);
else
    this->Data=Ghost_Data;


I think that should do it for now. I'll fix it properly soon.

#159 SpacemanDan

SpacemanDan

  • Members
  • Location:Ontario, Canada

Posted 05 September 2012 - 11:36 AM

Worked like a charm. Many thanks for that. icon_smile.gif

#160 Saffith

Saffith

    IPv7 user

  • Members

Posted 12 October 2012 - 04:20 PM

I'm thinking of splitting this into multiple files, as it's gotten to be kind of a pain to update. I think the best way to do that would be put each section in a separate file; ghost.zh itself would just be the settings and import statements for the other files. That works out to about 14 files, so I'd put all the new ones in a subdirectory to keep the clutter to a minimum. Does anyone have any objections to that?

#161 SpacemanDan

SpacemanDan

  • Members
  • Location:Ontario, Canada

Posted 12 October 2012 - 10:17 PM

I'd be okay with this. icon_smile.gif

Out of curiousity, is there any settings to make ghosted enemies not vanish while Link is holding items up?

*Is getting the feeling he missed something obvious*

#162 Saffith

Saffith

    IPv7 user

  • Members

Posted 12 October 2012 - 10:26 PM

Dang. icon_razz.gif That'll be an issue with using DrawCombo. I think I can work something out.

#163 Moosh

Moosh

    The Mush

  • Moderators

Posted 12 October 2012 - 11:48 PM

QUOTE(SpacemanDan @ Oct 12 2012, 09:17 PM) View Post

I'd be okay with this. icon_smile.gif

Out of curiousity, is there any settings to make ghosted enemies not vanish while Link is holding items up?

*Is getting the feeling he missed something obvious*

Isn't there a screen flag for that?

#164 Saffith

Saffith

    IPv7 user

  • Members

Posted 13 October 2012 - 12:23 AM

An FFC flag. It'll have to be set automatically and faked.

#165 Moon

Moon

    goopy

  • Members
  • Pronouns:She / Her
  • Location:Viridi Town

Posted 13 October 2012 - 12:28 AM

FFC Flag: Is active when Link is holding item should work. icon_smile.gif


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users