Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-09-18 18:25:05

theoblivinator
Member
From: Iowa
Registered: 2012-08-20
Post 30/98

Flag help in Pokemon Gold

I created a new person in Violet City to block the gym until you have finished Sprout Tower, just like in HG/SS. In JohtoMap I gave the person a Flag Bit of 14 (this is the flag that is set once you receive HM Flash from Sage Li after you beat him).

My problem is that he doesn't hide himself when that bit is set. He still prevents access to the gym.

Is there something else I need to do besides giving my person a flag bit of 14?

Last edited by theoblivinator (2012-09-18 18:25:18)

Offline

#2 2012-09-18 18:30:30

Akwa
Member
Registered: 2012-06-14
Post 54/140

Re: Flag help in Pokemon Gold

If you say this flag is set when Flash HM is received, then this guy won't dissapear. You see, to make the guy dissapear, a flag has to be reset, not set. I did same thing in my hack using flags of the teacher from the Violet School. There was some strange behavior of these flags though, like setting one flag automatically reset the second one (something like that).

Offline

#3 2012-09-18 18:37:51

theoblivinator
Member
From: Iowa
Registered: 2012-08-20
Post 31/98

Re: Flag help in Pokemon Gold

I guess I was going off of this from the Scripting Compendium by Tauwasser:

[Bit no. of BitTable1 (Hidden if set)(FFFF for none)(2byte)]

Particularly the "Hidden if set" part. If persons are hidden when bits are reset instead then perhaps the Compendium has an error in it. I'll let others post their thoughts too, and I'll keep tweaking my modifications to get it to work.

Off the bat I don't see any problem with changing Sage Li's script to reset bit 14 instead of setting it.

Offline

#4 2012-09-18 19:24:58

Miksy91
Member
Registered: 2010-10-16
Post 1,108/2,306

Re: Flag help in Pokemon Gold

If the bit number of the person event is 1 (=set), the person event will be hidden when that room is entered.
All done here.

The problem you're having is probably the fact that he doesn't use the same bit number as the HM Flash's one.
(For instance, you're using 00 14 while you should be using 14 00)

Akwa wrote:

If you say this flag is set when Flash HM is received, then this guy won't dissapear. You see, to make the guy dissapear, a flag has to be reset, not set. I did same thing in my hack using flags of the teacher from the Violet School. There was some strange behavior of these flags though, like setting one flag automatically reset the second one (something like that).

For example, the bit number of the teacher inside the school is automatically set when the "game begins" (actually, a script is called from the script header of your room that sets it), same goes for the bit number Guide Gent uses inside his house. When teacher goes to the school, he's made to disappear which also sets his bit number on that map and after (or before) that command, the script also resets the bit number teacher uses inside the school.

Last edited by Miksy91 (2012-09-18 19:27:46)

Offline

#5 2012-09-18 19:50:04

theoblivinator
Member
From: Iowa
Registered: 2012-08-20
Post 32/98

Re: Flag help in Pokemon Gold

So in JohtoMap I actually had to give him a Flag Index of 14, not a Flag Bit of 14. Guess I had those mixed up. Anyways I did that and it still wasn't working and I was about to flip a table.

I used my Hex editor to check out the data for that person and his flag data was set at " 14 14" so somehow I think JohtoMap didn't set the Flag Bit back to 00. I changed it manually and tested it and it seems to be working now. Hope it stays that way.

Thanks for your help everyone! :)

Offline

Board footer

Powered by FluxBB