ghost.zh
#76
Posted 25 August 2011 - 04:19 PM
#77
Posted 25 August 2011 - 04:26 PM
#78
Posted 26 August 2011 - 10:32 AM
EDIT: I was ANDing instead of ORing it. That was the problem. This is fixed now.
Edited by blackbishop89, 26 August 2011 - 11:06 AM.
#79
Posted 26 August 2011 - 02:35 PM
#80
Posted 26 August 2011 - 02:45 PM
#81
Posted 26 August 2011 - 03:04 PM
#82
Posted 26 August 2011 - 03:10 PM
Also could you post this enemy script so I could better help you. Thanks.
#83
Posted 26 August 2011 - 03:43 PM
The script I'm using is my Spark_SMB2 script, which is in this topic:
http://www.purezc.co...mp;#entry731534
#84
Posted 26 August 2011 - 03:55 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
Okay I'll read though it, and see if I can figure out what is wrong.
#85
Posted 27 August 2011 - 01:32 AM
#87
Posted 28 August 2011 - 02:44 PM
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
Posted 31 August 2011 - 05:05 PM
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:
true
false
false
Shouldn't it print true 4 times? It also doesn't matter what TEST_DISTANCE is set to.
#89
Posted 05 September 2011 - 08:23 PM
I'll check it out.
D'oh.
No, they're supposed to snap both ways.
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.
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
Posted 06 September 2011 - 08:58 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users