Jump to content

Photo

ghost.zh


  • Please log in to reply
645 replies to this topic

#451 Deedee

Deedee

    Small Pixie Dragon

  • Administrators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 19 November 2015 - 10:25 AM

Will this new update let you set a death animation as an argument to Ghost_Waitframe? As in, can you make it so that You don't have to check the enemy's HP, set it to 1, turn off collision,and then call it?

 

Or am I simply missing an update?



#452 Saffith

Saffith

    IPv7 user

  • Members

Posted 19 November 2015 - 12:10 PM

Will this new update let you set a death animation as an argument to Ghost_Waitframe?

That was added in 2.7.

As in, can you make it so that You don't have to check the enemy's HP, set it to 1, turn off collision,and then call it?

You don't need to do any of that for built-in death animations. They'll keep the enemy alive and disable collisions automatically.

#453 Moosh

Moosh

    The Mush

  • Moderators

Posted 03 December 2015 - 09:50 PM

So I've been having problems with EWD_AIM_AT_LINK. I'm pretty sure it used to aim the weapon directly at Link, but now it's aiming at an angle where it seems to aim near Link, but never hits him if he's standing still. I tested this in an isolated script file to make sure it wasn't something a global script caused and it still happened. Any idea what's causing this?



#454 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 03 December 2015 - 10:47 PM

http://www.purezc.ne...=25#entry923734

It's fixed in newer versions of ghost.zh. In the "void __DoEWeaponDeathAimAtLink(eweapon wpn)" function, you can put a return statement just below "wpn->Misc[__EWI_ON_DEATH]=0;". Otherwise it adds 0.3 to the angle for some reason.

EDIT: Oops, got my text files mixed up. Looks like the ghost.zh I got around 2.50.0's time is the one that does it right, and 2.50.2's ghost.zh was the one that removed the return statement.

Edited by Lejes, 03 December 2015 - 10:55 PM.

  • Moosh likes this

#455 Moosh

Moosh

    The Mush

  • Moderators

Posted 03 December 2015 - 11:29 PM

That solved it. Thanks for your quick response, Lejes.



#456 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 04 December 2015 - 12:11 AM

http://www.purezc.ne...=25#entry923734

It's fixed in newer versions of ghost.zh. In the "void __DoEWeaponDeathAimAtLink(eweapon wpn)" function, you can put a return statement just below "wpn->Misc[__EWI_ON_DEATH]=0;". Otherwise it adds 0.3 to the angle for some reason.

EDIT: Oops, got my text files mixed up. Looks like the ghost.zh I got around 2.50.0's time is the one that does it right, and 2.50.2's ghost.zh was the one that removed the return statement.

 

@Saffith: Why was that removed? I'm curious if it's an offset for something important, so that we know.



#457 Saffith

Saffith

    IPv7 user

  • Members

Posted 04 December 2015 - 01:19 AM

I have no idea what's going on there. I'll have to figure it out, I guess. I'm sure I didn't mean to publish it as it is.

#458 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 04 December 2015 - 01:29 AM

Yeah, that function has a lot of weird stuff in it that never gets reached due to hitting return statements, and an "else if (false)".

#459 ywkls

ywkls

    Master

  • Members

Posted 06 December 2015 - 09:42 PM

Ghost_TileWidth and Ghost_TileHeight should now be considered read-only. Ghost_SetSize() should be used to set them.

 

I know that the arguments for npc's still work because some of my scripts still use them successfully. However, I noted in a recent script that I wrote that the npc the script created was ignoring the code for the settings of TileHeight and TileWidth. These were additional enemies created by the script in addition to the ghosted enemy in order to create a combined enemy which is larger than the ghost script can create. (Basically, using a small enemy to control a large enemy.)

 

Here's the lines of the script that control the creation of the extra enemies.

npc ShellTop = Screen->CreateNPC(SHELL_TOP);
npc ShellBottom = Screen->CreateNPC(SHELL_BOTTOM);
ShellTop->TileHeight = 3;
ShellTop->TileWidth = 6;
ShellBottom->TileWidth = 6;
ShellBottom->TileHeight = 3;
ShellTop->X = Ghost_X-40;
ShellTop->Y = Ghost_Y-16;
ShellBottom->X = ShellTop->X;
ShellBottom->Y = Ghost_Y+16;

I have other scripts that use this method, even with the new ghost.zh model, so I know it works.  The SHELL_TOP and SHELL_BOTTOM are declared are enemies 213 and 214 respectively outside of the script. Any help would be greatly appreciated.

.


Edited by ywkls, 06 December 2015 - 09:43 PM.


#460 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 06 December 2015 - 09:51 PM

You need to set npc->Extend to 3 before those settings will take effect. You'll also want to adjust HitWidth and HitHeight, which are measured in pixels I believe.
  • ywkls likes this

#461 ywkls

ywkls

    Master

  • Members

Posted 06 December 2015 - 09:54 PM

You need to set npc->Extend to 3 before those settings will take effect. You'll also want to adjust HitWidth and HitHeight, which are measured in pixels I believe.

 

Now I feel like an idiot for forgetting that sort of thing. Shows how long it has been since I did things that way. Thanks!



#462 ywkls

ywkls

    Master

  • Members

Posted 06 December 2015 - 10:44 PM

Okay, now I've got a new error. My enemy works fine, as long as it isn't in sideview gravity. (Where it is intended to exist.) I've got the line, Ghost_SetFlag(GHF_NO_FALL) at the beginning of the script.

 

Within the script, I have multiple nested while loops that handle various things and a custom waitframe to monitor all of the segments. Whenever the first while loop ends, the thing acts as if forgets that flag is supposed to be set. I even tried placing multiple instances of setting the flag after the end of every while loop, but it ignored it. What's going on?

 

I can provide a commented version of the whole script if needed.



#463 Lejes

Lejes

    Seeker of Runes

  • Members
  • Location:Flying High Above Monsteropolis

Posted 06 December 2015 - 11:12 PM

Did you try setting the GHF_FAKE_Z flag as well?

#464 ywkls

ywkls

    Master

  • Members

Posted 06 December 2015 - 11:19 PM

Did you try setting the GHF_FAKE_Z flag as well?

 

Yes. Also tried setting both flags after each while loop. That didn't work either. This thing is beautiful in normal gravity, but non-functional in sideview and I don't know why.



#465 ywkls

ywkls

    Master

  • Members

Posted 07 December 2015 - 12:21 AM

Is there any size limit on Big Eweapons? Enquiring (inquiring?) minds want to know.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users