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.
[RESOLVED] A Flashlight!

0 Members and 1 Guest are viewing this topic.

****
MONOCLE MAN
Rep:
Level 89
-::Gone::-
I need to know how to make a flash light, I'll tell how I want it:

When your in a room, it's complete black, and you chacter is shown on top of all the black but in your weapons
slot, you need to have a Flashlight equipped, and if it is, it shoots out a beam of light (just showing some of the tileset)
and if it is unequipped, the light vanishes. And I want it in a Triangle like shape, coming from the chacter.

Please help me with this!
« Last Edit: November 20, 2006, 01:00:29 PM by Blizzard »

****
Rep:
Level 89
What will that crazy ape do next?
well unless u really wanted to event like crazy everywhere, u may need scripts for this.  i was messing with this in my head but i can't see any other way to do it.
My Project: Dark Empire
http://rmrk.net/index.php/topic,7815.0.html
Official Site: http://darkempirerpg.tripod.com
Process: Getting back to work.

Always looking for sprites, if your interested, PM.

"But then I realized, why stop things from exploding, when in fact it is in exploding that things reach their perfect form. Of course, they only reach it for a few glorious seconds, but during that short time there is no object in the universe more beautiful." -Kite Rockswell, the Mad-Mad Bomber, from The Final War, my very own novel project.  PM me if you would like to read.

"Oh, sure, blaim the wizards..."

*
I love Firerain
Rep:
Level 97
=D
See, use branches

if someone presses say a
then
tint screen(as the light spreads all room)
if not
then
GET THE HELL LOST MY DOGZ BURINNG
.

i think.
Arlen is hot.

****
MONOCLE MAN
Rep:
Level 89
-::Gone::-
Um...what? 0_o.

****
Rep:
Level 89
What will that crazy ape do next?
See, use branches

if someone presses say a
then
tint screen(as the light spreads all room)
if not
then
GET THE HELL LOST MY DOGZ BURINNG
.

i think.

this would work if he didn't mind the whole room being lighted.  but he wanted only the room in front of the hero lighted as the hero moved around.
My Project: Dark Empire
http://rmrk.net/index.php/topic,7815.0.html
Official Site: http://darkempirerpg.tripod.com
Process: Getting back to work.

Always looking for sprites, if your interested, PM.

"But then I realized, why stop things from exploding, when in fact it is in exploding that things reach their perfect form. Of course, they only reach it for a few glorious seconds, but during that short time there is no object in the universe more beautiful." -Kite Rockswell, the Mad-Mad Bomber, from The Final War, my very own novel project.  PM me if you would like to read.

"Oh, sure, blaim the wizards..."


****
MONOCLE MAN
Rep:
Level 89
-::Gone::-
Thats perfect! But I want to make it pitch black but with the beam coming form him

**
Rep: +0/-0Level 88
I'm gonna be real with you, this is going to be a lot of work!

Here's what you can do:

You'll need to have 5 pictures.  That's right, make 'em yourself in iDraw.

-The first picture needs to be 320x240 and completely black.  No other colors.
-The next picture needs to be completely black, but with the transparant color facing a particular direction like this:
888      888
 888     888
  888   8888               All the 8's are supposed to represent black screen.  You wanna leave a path (the beam) in the
888888888                transparant color.  This, for example, would be when your character is facing up.
888888888
888888888

-Then you need another picutre exactly the same, but with the transparant color (the beam) facing right, instead of up like in the example above.
-Then you need another picture for down, (you can just flip the "up" one horizontally).
-And lastly another picture for the left direction (flip the "right" one vertically).
-Save each as a separate picture.

I hope you're good with events...otherwise this will be difficult to understand.

1) You need to have a parralel process going on in the background.
2) In the event commands, page 3, select "Fork Conditions"
3) On page 2 of the fork conditions, select Hero - face up.  (This will check if the hero is facing up)
4) Click OK
5) Inside the fork clause, change a variable (name it Direction), set it to 1.  1 will be for up.
6) Repeat steps 2 - 5, but cange it for hero facing right, and make Direction set to 2 (for right).
7) Repeat 2 - 5 for hero facing down, set direction to 3 (for down).
8) Reapeat 2 -5 for hero facing left, set direction to 4 (for left).
9) Now change a new variable called "Weapon Slot" and set it equal to the hero's Arms#.

Essentially, what we've just done is create an event that will constantly check which direction the hero is facing, and assign it a value.  If the hero is facing up, variable Direction will be 1.  If he's facing down, Direction will be 3 and so forth.  You can even make this a common event if you want in the database.

Now, in the database, you have to make an item in the number 100 slot.  What I mean by that is when you go to the items screen in the database, every item is numbered with an ID.  Just go to the number 100 ID and make your Flashlight in that slot.  IT MUST BE A WEAPON!!!

Now we need another parallel process event to show which picture will be displayed, but it will only activate if variable "Weapon slot" is above 100, that way, this event will only trigger while you've got the Flashlight in item slot# 100 equipped.  ;)

1) Put a "Fork Condition" command to read -- if Direction is equal to 1.  This will check if direction is 1.
2) Inside the fork clause, go to event commands page 2, click show picture 1: (the "Up" beam picture)
3) Repeat steps 1 and 2, but change Direction to 2, keep it as picture 1, but change it to the "Right" beam picutre.
4) Again for Direction equal to 3 with "Down" beam picture...
5) And again for Direction equal to 4 with "Left" beam picture.

I think that should do it.  If that doesn't work, post a new response and I'll see about fixing it...either way though, I should recieve a freaking medal for explaining something so complex!  :)

****
MONOCLE MAN
Rep:
Level 89
-::Gone::-
Um, I'm using the script. Nouman gave me

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
lol, to end reply's lock topic and add [RESOLVED] to the title...or leave it unlocked in case people have questions.
Watch out for: HaloOfTheSun