Jump to content

Photo

ghost.zh


  • Please log in to reply
645 replies to this topic

#136 Mero

Mero

    Touch Fluffy Tail

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

Posted 22 May 2012 - 10:55 AM

Why not just take two arguments for flags and group terrain flags together and all other flags in the other group.

#137 Saffith

Saffith

    IPv7 user

  • Members

Posted 22 May 2012 - 11:19 AM

That would work for now, but it's likely I'd run into the same problem again later on. Further division would make it increasingly difficult to maintain compatibility with existing scripts and would pretty quickly negate the benefit of doing it that way in the first place.

#138 Saffith

Saffith

    IPv7 user

  • Members

Posted 06 June 2012 - 11:01 AM

QUOTE(Gleeok @ Jun 6 2012, 08:43 AM) View Post

Found bugs! icon_nerd.gif

UpdateEWeapon():
CODE

    // If Link's holding up an item, don't do anything
    if(Link->Action==LA_HOLD1LAND || Link->Action==LA_HOLD2LAND ||
       Link->Action==LA_HOLD1WATER || Link->Action==LA_HOLD2WATER)
        return;

    // If this is a dummy, or if it's not a ghost.zh weapon, don't do anything
    if((wpn->Misc[__EWI_FLAGS]&__EWFI_IS_GHZH_EWPN)==0 || (wpn->Misc[__EWI_FLAGS]&__EWFI_DUMMY)!=0)
        return;


The first 4 comparisons should be checked only once, not once per weapon. Also the next 4 should be inlined to avoid the function since it's 99% likely that they are not ghost created. ( I would inline everything in UpdateEWeapons() since it's required to call once per frame anyway you don't need to ever update only one weapon. Optimize it! icon_razz.gif)

Also the THROW_BOUNCE thing is neat. Thanks for scripting the math for that already...because I really did not want to.

You got the wrong thread. icon_razz.gif I'd move your post, but apparently I don't have that ability.

Anyway, yeah, I guess I'll do that. I made it that way since I wanted to have to option to call UpdateEWeapon on the individual weapons you want handled and skip the rest, but, now that I think about it, neither check is really necessary in that case.

#139 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 06 June 2012 - 11:33 PM

This is odd. I made an autoghost enemy, and I tried setting its combo (misc attribute 11) to both GH_INVISIBLE_COMBO and __GH_INVISIBLE_ALT (-1) and still the enemy is invisible. I even set it to a combo that looks like the enemy and it used a different combo near it in the combo sheet. I changed the combo, hoping to make up for the offset... but it did a different nearby combo.

WHAT IS UP WITH THIS?! Everything else in the script works besides showing the enemy.
Script


#140 Saffith

Saffith

    IPv7 user

  • Members

Posted 07 June 2012 - 12:03 AM

You've got regular Waitframes in there. Does replacing those fix it?

#141 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 07 June 2012 - 01:01 AM

QUOTE(Saffith @ Jun 6 2012, 09:01 AM) View Post

You got the wrong thread. icon_razz.gif I'd move your post, but apparently I don't have that ability.


Whoops, sorry 'bout that! Same great cookie crunch, half the monkey ball extract. icon_nerd.gif ...But yeah, everything else is meh, but the eweapons need to be optimized aggressively. After about 200 bullets you get slowdown.

I also misread your enemy->Misc bit you wrote. It uses Misc 15 by default for enemies but for some reason I thought it used all of them but 15. I don't know why I thought that. :\

#142 Moosh

Moosh

    The Mush

  • Moderators

Posted 07 June 2012 - 06:37 AM

QUOTE(Gleeok @ Jun 7 2012, 12:01 AM) View Post

Whoops, sorry 'bout that! Same great cookie crunch, half the monkey ball extract. icon_nerd.gif ...But yeah, everything else is meh, but the eweapons need to be optimized aggressively. After about 200 bullets you get slowdown.

I also misread your enemy->Misc bit you wrote. It uses Misc 15 by default for enemies but for some reason I thought it used all of them but 15. I don't know why I thought that. :\

200 eweapons? When would you ever need that many? WthSmiley.gif

Also SHOOT I've also been using Misc[15]!

#143 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 07 June 2012 - 01:43 PM

QUOTE
You've got regular Waitframes in there. Does replacing those fix it?


Nope. No better.

#144 Saffith

Saffith

    IPv7 user

  • Members

Posted 07 June 2012 - 06:12 PM

Hm, I'm seeing it with other things, so it's definitely a failure on my part. I swear I tested that... Must not have been with the final version.
I don't see what the problem is yet, though. I'll update it when I find it.

QUOTE(Moosh @ Jun 7 2012, 07:37 AM) View Post
Also SHOOT I've also been using Misc[15]!

That's npc->Misc, mind. Depending on what you're doing with it, using it yourself may not cause problems, but it's better not to risk it. You can change which element is used by setting __GHI_IN_USE.

#145 Saffith

Saffith

    IPv7 user

  • Members

Posted 15 June 2012 - 11:20 PM

All right, should be fixed now. Sorry to take so long. icon_razz.gif

#146 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 16 June 2012 - 10:39 AM

Thanks, it works!

#147 Moosh

Moosh

    The Mush

  • Moderators

Posted 20 June 2012 - 07:48 AM

How can I detect if a ghosted enemy is able to move x steps at y angle with z pixels of imprecision? I tried Ghost_CanMove(), but it didn't work...

#148 Moosh

Moosh

    The Mush

  • Moderators

Posted 01 July 2012 - 02:46 PM

So I've noticed that Ghost.zh doesn't interact very kindly with sideview gravity...Mainly I can't get a floating enemy to move upwards...Any help?

#149 Saffith

Saffith

    IPv7 user

  • Members

Posted 02 July 2012 - 12:22 PM

Set GHF_NO_FALL.
I still need to do some work on the movement functions. I just haven't been good about actually doing stuff lately... icon_razz.gif

#150 Saffith

Saffith

    IPv7 user

  • Members

Posted 12 July 2012 - 02:01 PM

Another small update to fix a couple of bugs I ran into recently. Also, I added a new option for misc. attribute 11: __GH_INVISIBLE_EXTEND (-2 by default), which will set up an FFC with the invisible combo but still set npc->Extend to 3.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users