View Single Post
  #977    
Old October 20th, 2009, 04:28 AM
Pokepal17's Avatar
Pokepal17
More cowbell~
 
Join Date: Oct 2008
Location: Steeltown
Age: 19
Gender: Male
Nature: Modest
Quote:
Originally Posted by colcolstyles View Post
That's genius! Of course, the script would have to be different for every map as the locations of puddles would vary from map to map. But that's a really neat idea

Also, I looked over your latest entry and the idea looks pretty cool. Only, I can't seem to think of any useful function for it :\
There was an issue in the old RHN that demonstrated how one could use 'writebytetooffset' to change the pointer to the player's OW in the RAM to another OW. Using that method would eliminate some of the glitches present with the '0x0B' behavior method, leading me to believe that the '0x0B' method doesn't have any benefits.

Though if you're interested I found out that when the player switches control to the "0x0B NPC", their range of movement is limited. Upon closer inspection, I discovered that the available walking range is dependent on the value in the 'Movement' byte in AdvanceMap. As I'm sure you're already aware, that byte controls how many tiles a NPC can move vertically and horizontally. For example, a value of 21 would give the NPC a range like this (behold the amazing ASCII art):
______
|_|_|_|
|_|_|_|
|_|X|_|
|_|_|_|
|_|_|_|

...with the X representing the original location. Anyways, I found that when you switch control from the player to the NPC, the player is limited to only those tiles. Everything else acts as though it's movement permission is '1'. Once I discovered that the Movement byte was the controlling factor, I deducted that the maximum movement range would be 17x17 ('0xFF' (counting the original location)) but if you set the Movement byte to 0x00, then the NPC's range becomes unlimited :O
So I guess that might be useful if you plan on using this.

As a helpful tip, you can use the command 'spritebehave wPeople# bBehaviour#' to change a NPC's behavior byte to '0x0B' at any time.

One thing which I was very disappointed to discover was that 'special 0x8E' doesn't mimic the effect of, say, opening and closing the bag. Nor does 'fadescreen', though (unlike 'special 0x8E') I didn't expect that work in the first place. So unless you can think of some other 'special' (or anything that might emulate the opening and closing of the bag) then we can't control when and where the player switches control to the NPC :\

On a final note, I've been experimenting with the possibility of having two "0x0B NPCs" on the same map but I haven't been able to draw any conclusions so far. Please, let me know if you make any discoveries of your own.

Edit: Whoa, I just found out something more. If you open the Bag again (after you've already "morphed" into the "0x0B NPC" (do you mind if I just start calling them BNPCs?)), you will retain control over that NPC but the OW graphic will change back to that of the Player's default OW. Interesting...
Yep that's so true. But I have a way which is kinda cheating but it will look like you are controlling an npc, but you will not be able to interact with scripts. But it won't wear off.

Hiroshi, if you're interested PM me (or for ease add my MSN, I'm more on there than I am PC).
__________________
Pokémon Stardrop