RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[REQUEST] Torch/lamp/Flash light

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 85
Alright this should be a rather simple request. Now before I start I would like to say I searched the database and didn't find this so...:


Alright I'm asking for this script for two reasons. One is for my own use, the other is because there's close to a post a day requesting this at a couple of the forums I hang out in.

Anyway What I am looking for is a script that turns the entire screen black except for a 3-tile (if alterable that would be prefered) diameter circle around the player. I have tried using a combination show picture and move picture commands but that just turns out buggy. I then tried through the use of an animation and a parallel process event except that caused a lot of lag. So I deem it nescessary to have it in a script format.

So anyway if anybody is willing to make this script or maybe link me to a similar script I may have missed that would be greatly appreciated!

ultimaodin
« Last Edit: April 23, 2008, 01:11:37 PM by Falcon »

******
Revolution is not a bed of roses.
Rep:
Level 91
Project of the Month winner for July 2009
There are so many ways to do this, some don't need a script.

Strike 1 for not reading rules.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Mmn, doing it by events might be a little tricky for a beginning eventer, but it's the best way to do it.

Just make a picture in Paint.NET or another image editing program that is 1280 x 960 and make it completely black. Then use a gradient tool or whatever is appropriate in your image editor. and make a circle with origin in the centre of the picture (640, 480). For a three tile radius, you're looking at a circle with radius 96.

Once you have that picture, then the eventing is easy. Just make a parallel process common event that acts on a switch. You can choose the switch, and whenever you want to turn on the lamp or whatever, then just turn that switch on.

In any case, inside the event, just make it look like this:

@>Control Variables: [XXX: Screen X] = Player's Screen X
@>Control Variables: [YYY: Screen Y] = Player's Screen Y
@>Show Picture: 1, 'Picture', Center (Variable[XXX][YYY]), (100%, 100%), 255, Normal
@>Wait: 1 frame(s)

I've attached a sample picture.

*
Resident Cloud
Rep:
Level 91
you could even do a coned image

\ /

^crap acii art but meh. This would look more realistic for electric torches but the circles would be better for flame torches.


**
Rep:
Level 85
That's how I have been doing it, it just has a few minor issues. A major one is if you require a second parrallel process running and it becomes excessively laggy!
Another is the fact That sometimes the parrelel process by itself lags and it leaves the image trailing behind the player.

Another more insignificant issue is that yes, a vast array of new time eventers find the evented system difficult. I did read the rules I am simply inquiring about a scripted version that isn't so... bugged.

ps I apologise about my bad spelling. I may be 18 but spelling just sucks for me!


ultimaodin

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
It's not so laggy if you put in extra wait frames. 1 or 2 frames shouldn't make a major difference to the functionality of the event.

Maybe there is a script out there, I'm not sure, but when the eventing is that easy I would have no motivation to write a script. In any case, best of luck finding someone to write this script for you.

********
moew
Rep:
Level 91
Queen Princess
2013 Most Missed Member2012 Most Missed Member;o hee hee <3For being a noted contributor to the RMRK Wiki
I know I've seen a script like this, it does exist somewhere.

Don't ask where, don't even ask the name, I have no idea. Sorry.
:taco: :taco: :taco:

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
I remember Levent said something about one too. I took a look and found this:

http://comunidad.rpgmaker.es/viewtopic.php?f=18&t=9225&start=0&st=0&sk=t&sd=a

It'ss an English script, but this is the site I found it on. Anyway, maybe it will do what you want it too.