The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => Topic started by: TeaBag on May 01, 2007, 04:48:47 PM

Title: Torch item (XP)
Post by: TeaBag on May 01, 2007, 04:48:47 PM
Hey you guys, I was wondering if there was an easy way to make a torch item, like the one from dragon quest.  Basically, you go in a cave and have a limited field of view, but when the item "torch" is used, the view expands a great deal.  I drew a little diagram to show what I'm talking about.. 

(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg67.imageshack.us%2Fimg67%2F3281%2Ftorchuf5.png&hash=4783b6a464226f9ab32ad3f7ecde300945951f35) (http://imageshack.us)

I'm just wondering how I should do the black circle part, a picture that follows the hero, and changes with common events?  That's my guess, but I'd like someone to walk me through it.  Plus, it'd be a nice bonus if the hero's sprite changed to a version where the hero is holding a torch.

Thanks!
Title: Re: Torch item (XP)
Post by: InvaderZim on May 01, 2007, 04:59:35 PM
As far as I know, you use a black picture with the center cut out as the 'darkness'. As to how you center it on the hero all of the time, even when he is in the corner of the screen, I don't know. When the torch is used, throw a switch that changes the size of the hole in the picture (different picture witha larger cut out).
Title: Re: Torch item (XP)
Post by: Yawgmothsbud on May 01, 2007, 05:06:29 PM
I was recently working on the same thing: a simple yet limited way to do this is to have "dark" maps show the picture on entrance. The limitation is that you'll have to leave room between the edges of the map and the actual walls of the navigable area, or else when you enter a corner or go near the edge the picture will stop and your character will move out of the "light".
As for having a torch, just make another picture with a larger hole in the center and have it be shown instead of the first if the torch is held.
Title: Re: Torch item (XP)
Post by: Kokowam on May 01, 2007, 07:38:26 PM
In one of the databases, you can get a fog of war thing. Then, you could just call script that when you have torch, sight is more. If you don't have torch, sight is smaller.
Title: Re: Torch item (XP)
Post by: modern algebra on May 01, 2007, 11:00:27 PM
I was recently working on the same thing: a simple yet limited way to do this is to have "dark" maps show the picture on entrance. The limitation is that you'll have to leave room between the edges of the map and the actual walls of the navigable area, or else when you enter a corner or go near the edge the picture will stop and your character will move out of the "light".
As for having a torch, just make another picture with a larger hole in the center and have it be shown instead of the first if the torch is held.

That limitation can be avoided by having the position of the picture dependent on the player's Screen X and Screen Y (through variables), rather than just set to cover the screen.
Title: Re: Torch item (XP)
Post by: Yawgmothsbud on May 02, 2007, 02:49:13 AM
oooh...thanx  ;D