Jump to content

Photo

ghost.zh


  • Please log in to reply
645 replies to this topic

#76 Mero

Mero

    Touch Fluffy Tail

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

Posted 25 August 2011 - 04:19 PM

Not for ghost.zh but there is a video tutorial for setting up autoghost enemies that Saffith put together.

#77 Imzogelmo

Imzogelmo

    Experienced Forumer

  • Members
  • Real Name:Joseph

Posted 25 August 2011 - 04:26 PM

I pretty much looked at Saffith's examples and read his ghost.txt file to figure out how to do them. The demo video he put on YouTube helped a lot too. I've never even made any scripts more than a couple dozen lines long before, but I wanted to make an enemy to push myself to get a bit better. From there, it was a lot of trial and error to get it working just right. OK, that last part is still ongoing. icon_lol.gif

#78 Mero

Mero

    Touch Fluffy Tail

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

Posted 26 August 2011 - 10:32 AM

How do we use GHF_NO_FALL I've tried using it but it doesn't seem to do anything.

EDIT: I was ANDing instead of ORing it. That was the problem. This is fixed now. icon_smile.gif

Edited by blackbishop89, 26 August 2011 - 11:06 AM.


#79 Imzogelmo

Imzogelmo

    Experienced Forumer

  • Members
  • Real Name:Joseph

Posted 26 August 2011 - 02:35 PM

I'm having trouble making multiple enemies on the screen when using ghost.zh. NumNPCs is staying at 1, so AutoGhost() isn't making them, and I don't know why. Any ideas?

#80 Mero

Mero

    Touch Fluffy Tail

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

Posted 26 August 2011 - 02:45 PM

Did you add he GhostZHActive script to the active slot, or your own script? If it's you're own could you post it please.

#81 Imzogelmo

Imzogelmo

    Experienced Forumer

  • Members
  • Real Name:Joseph

Posted 26 August 2011 - 03:04 PM

No, just using the GhostZHActive script that is included in ghost.zh.

#82 Mero

Mero

    Touch Fluffy Tail

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

Posted 26 August 2011 - 03:10 PM

Did you set attributes 11 and 12 if either of those = 0 it won't work.
Also could you post this enemy script so I could better help you. Thanks.

#83 Imzogelmo

Imzogelmo

    Experienced Forumer

  • Members
  • Real Name:Joseph

Posted 26 August 2011 - 03:43 PM

The attributes 11 and 12 are set correctly. The first enemy is a ghosted enemy and is working fine. Any subsequent enemies (ghosted or not) do not appear at all.

The script I'm using is my Spark_SMB2 script, which is in this topic:
http://www.purezc.co...mp;#entry731534

#84 Mero

Mero

    Touch Fluffy Tail

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

Posted 26 August 2011 - 03:55 PM

QUOTE(Imzogelmo @ Aug 26 2011, 02:43 PM) View Post

The attributes 11 and 12 are set correctly. The first enemy is a ghosted enemy and is working fine. Any subsequent enemies (ghosted or not) do not appear at all.

The script I'm using is my Spark_SMB2 script, which is in this topic:
http://www.purezc.co...mp;#entry731534


Okay I'll read though it, and see if I can figure out what is wrong. icon_wink.gif

#85 Imzogelmo

Imzogelmo

    Experienced Forumer

  • Members
  • Real Name:Joseph

Posted 27 August 2011 - 01:32 AM

Oh, please disregard. It wasn't a problem with the script, just with the user. icon_razz.gif

#86 Mero

Mero

    Touch Fluffy Tail

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

Posted 27 August 2011 - 09:02 AM

QUOTE(Imzogelmo @ Aug 27 2011, 12:32 AM) View Post

Oh, please disregard. It wasn't a problem with the script, just with the user. icon_razz.gif


Umm... Okay then... icon_smile.gif

#87 Imzogelmo

Imzogelmo

    Experienced Forumer

  • Members
  • Real Name:Joseph

Posted 28 August 2011 - 02:44 PM

Question about enemy bait.

I was looking in Ghost.zh and I noticed something: The enemy bait is only found when it's within 14 pixels of the Y coordinate of the monster. Is that right? There's no equivalent check for the X?

I always wondered what the actual behavior was.

#88 Colossal

Colossal

    Illustrious

  • Members
  • Location:Canada

Posted 31 August 2011 - 05:05 PM

I think there's a bug in the Ghost_CanMove() function. I used a typical empty NES dungeon room with just the walls and this script:
CODE
const int TEST_DISTANCE = 1;

ffc script testenemy {
   void run(int enemyID) {
      npc ghost = Ghost_InitAutoGhost(this, enemyID);

      while(true) {
         Ghost_X = 32 + TEST_DISTANCE;
         Ghost_Y = Ghost_X;
         TraceB(Ghost_CanMove(DIR_UP, TEST_DISTANCE, 0));
         TraceB(Ghost_CanMove(DIR_LEFT, TEST_DISTANCE, 0));
         Ghost_X = 208 - TEST_DISTANCE;
         Ghost_Y = 128 - TEST_DISTANCE;
         TraceB(Ghost_CanMove(DIR_DOWN, TEST_DISTANCE, 0));
         TraceB(Ghost_CanMove(DIR_RIGHT, TEST_DISTANCE, 0));
         Ghost_HP = 0;
         Ghost_Waitframe(this, ghost, true, true);
      }
   }
}

The script printed this in allegro.log:
CODE
true
true
false
false

Shouldn't it print true 4 times? It also doesn't matter what TEST_DISTANCE is set to.


#89 Saffith

Saffith

    IPv7 user

  • Members

Posted 05 September 2011 - 08:23 PM

QUOTE(blackbishop89 @ Aug 20 2011, 11:34 PM) View Post
Another bug. Ghost_Explode doesn't incorporate the Draw*Offsets. Can you fix this?

I'll check it out.

QUOTE(blackbishop89 @ Aug 21 2011, 08:31 PM) View Post
Is drift suppose to ignore normal movement?

D'oh.

QUOTE(blackbishop89 @ Aug 25 2011, 03:09 PM) View Post
Another problem with constantwalk4. It seems the enemies position is being snapped to the grid both directions. It should only be snapped to the grid on the axis it's NOT moving.

No, they're supposed to snap both ways.

QUOTE(Imzogelmo @ Aug 28 2011, 03:44 PM) View Post
I was looking in Ghost.zh and I noticed something: The enemy bait is only found when it's within 14 pixels of the Y coordinate of the monster. Is that right? There's no equivalent check for the X?

You misread that. It checks if the Y distance is greater than 14 and moves up or down if so, and left or right if not.

QUOTE(Colossal @ Aug 31 2011, 06:05 PM) View Post

I think there's a bug in the Ghost_CanMove() function. I used a typical empty NES dungeon room with just the walls and this script:

Huh. Yeah, that's not right. I'll look at it.

#90 Mero

Mero

    Touch Fluffy Tail

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

Posted 06 September 2011 - 08:58 AM

You're absolutely right about the snapping to the grid. The real problem is how you handle the counter. You need to change it to a float and cap it. Then decrement it by the step / 100. Also the step variable needs to be a variable. This will fix the shift bug. What is the shift bug. set step to the step of a blue darknut to find out. icon_wink.gif


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users