iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!

> Note for Tutorial Threads

New threads (tutorials) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.

2 Pages V   1 2 >  
Closed TopicStart new topic
> [-Eventing-] Spotlights? Torches? Flashlights?! Here now, the ins and outs of controlling these elements., How to show, and control a ring of light around your character!
Rating 5 V
Which method do you use/like the best?
Which method do you use/like the best?
Method I [ 18 ] ** [26.87%]
Method II [ 9 ] ** [13.43%]
Method III [ 9 ] ** [13.43%]
Method IV [ 1 ] ** [1.49%]
Method V [ 30 ] ** [44.78%]
Total Votes: 134
  
VIII
post Jun 6 2009, 11:13 PM
Post #1


Sing me your soft sweet lullaby
Group Icon


Type: Writer
Alignment: Chaotic Neutral




!NEW!

Want a flash light that darkens the screen and moves depending on the direction you are facing? Try these images! To use them, make a few simple event additions for any of these methods! When you get to the point in your method, where it is time to show the picture, instead, add in four new conditional branches. One for each player facing direction. In each conditional branch, place the corresponding show picture command!

Spoiler:






And here is a sample event...





This tutorial will use five different methods, I'm listing the different methods here at the top so you can find the one you want, and scroll to it's section below...
Method I; Always showing the picture on particular maps.
Method II; Requiring the player to have an item in their inventory to show the picture.
Method III; Requiring the player to activate their item.
Method IV; Requiring the player to hold a button to turn the light on.
Method V; Requiring the player to press a button to turn the light on and off.





Alright, so there has been some confusion about this for quite some time. When I started with VX I too had some confusion and frustration! So I've decided it is time for an in depth tutorial that will show you several different options for this special effect.

First, we have our picture. This is just a simple image I created for my own uses, but there are a few different ones available on this site and others. Most are fairly similar as they all employ the same idea.
Spoiler:

A large black image to cover the screen, with a ring of semi transparent white and then a fully transparent center.


Go ahead and save that and import it to your "Pictures" folder in your project.

Method I; Always showing the picture on particular maps.

Now, our first method is going to just be a simple test to make this image appear on our player, and follow their movements.

Go ahead and create a new event on whichever map you would like this effect. It's best if this event is out of the way somewhere, say in a wall, or unpassable tile, just in case. Give it a parallel process trigger. Now for our first entry in this event we need to set some variables. For this method we will be using two very simple variables (which are often used for other events in games anyways, so you may already have them!). First we need to create a variable, let's call it "Player's X", and we want to set this variable to the Player's Screen X, like so...

Spoiler:


We then need to make a second variable for the Y axis...

Spoiler:


Now that we have our variables, we can move on to the next entry in our event which is a simple "Show picture" command, like this...

Spoiler:


Note we have given the picture the X and Y position of the two X and Y variables we created. This will put the picture directly over our player. Also, we have applied the "Center" option, so our spotlight will appear in the appropriate place above our player.

Go ahead and test it out. Whenever you start on that map, this graphic will be shown. Just for precaution when you are using this method, whenever you want to leave the map through a transfer event, be sure to add an "Erase Picture" command, so the picture will not show on your next map.



Method II; Requiring the player to have an item in their inventory to show the picture.

This method is very similar to the first, so we are going to assume you know how to create and control variables, and use show picture commands.

The only real difference in this method is that we are going to first (in the same event, above all other commands) tint the screen pitch black, like so...

Spoiler:


Now, I usually add a text command to let the player know that they need an item to be able to see on this map, but that is completely up to you.

Now we need to create our item!

Spoiler:


Simple enough, the price can be whatever you want, make sure your player cannot use the item and it is not consumed. It's really just a ghost item that you cannot use!

Since we have created our item, we can now create a conditional branch in our torch event like so...

Spoiler:


This event now checks if our player has the needed item, and then shows the picture appropriately. Also note that we have added in our "else" section, commands that will remove the picture and tint the screen to black if for any reason, the torch is removed from the player's inventory. You probably don't need this else statement but just in case...



Method III; Requiring the player to activate their item.

Alright, so now you know how to use conditional branches, variables, show picture commands, and screen tint! You're learning something new every day! Huzzah! Ok, moving on.

So sometimes we want a little control over our game, which introduces us to our third method.

We are this time, going to go back and edit the item we created earlier, this time, we want it to call a common event and only be able to use it from the menu. Now for the common event we want to call...

Spoiler:


And our map event...

Spoiler:


Simple right? Now our player has to use the torch to turn the light on, and when they use the torch again, the light is turned off! Again for precaution, in your transfer events, turn the torch switch off, and set the map tint to whatever you would like.


Method IV; Requiring the player to hold a button to turn the light on.

This method is going to use a button press from the player to turn the light on. When they aren't holding the button, the light will go out.

Be sure to check what buttons are assigned to what letters in your game by pressing F1 while you are in test play, and checking the keyboard configuration. Try to set the button you would like to a key that isn't normally used through the rest of your project. I have it set to use the shift key, as our X button. This method is tested and does work, but if you are having problems with it, double check your settings before complaining!

Spoiler:


Now this event doesn't require the player to have the item in their inventory. To do that, we add another simple conditional branch like so...

Spoiler:


Now the player has to have the torch in their inventory to use the button press command!

Awesome for instantaneous use of the torch effect! Although, some players may experience some discomfort from holding the button for lengthy dungeons, so this will lead us to our final method!


Method V; Requiring the player to press a button to turn the light on and off.

This is my favorite method. We just need to make some simple edits to method four to get this one to work appropriately.

This event has two pages now, here is our first page...

Spoiler:


And our second page...

Spoiler:


These events simply check if our button is pressed, turns the image process on, and then waits silently for another button press to turn the image process off.

If we want the player to have to have the torch in the inventory, we just have to edit the first page like so...

Spoiler:


Now the player cannot turn on the torch unless they have it! Whoo!




Well guys it's been fun, and now you have all the knowledge you will need to create your event! Feel free to edit any of the variable names, switch names, item names, etc, to whatever you would like for your game.

Please let me know if you found this tutorial helpful, and vote for your favorite method in the poll above!

Good luck with your games, guys.


Signed with love,
VIII

This post has been edited by VIII: Jul 4 2009, 07:14 AM


--------------------



I love Ookie, and you should too! If you love Ookie, put this in your sig!


I love variables, and you can too! Get the variable fix here!

My stuff

Tutorials
Bulletxt's Tile Swapper
Pet system NOTE: this system uses variables and switches, for a great script strictly for pets, check out OriginalWij's Pet script here!
Torches, Spotlights, and Flashlights!

Resources
There's a little bit of everything in here!
Go to the top of the page
 
+Quote Post
   
Oceano
post Jun 7 2009, 12:02 AM
Post #2


I Shot The Sheriff
Group Icon


Type: Designer
Alignment: Unaligned




Only problem about method V the "spotlight" image will only follow oyu on the X axis and when you go left or right
the image dosen't move, and you go into a dark spot.(The part thats not transparent)
You have to make it to where the image will follow you at all times.
I have done it before but it involved a common event

This post has been edited by Superly sexy unicorn lover: Jun 7 2009, 12:25 AM


--------------------

MISS MAY I
ROSE FUNERAL
EMMURE


Go to the top of the page
 
+Quote Post
   
S'orlok Reaves
post Jun 7 2009, 01:30 AM
Post #3



Group Icon


Type: Coder




QUOTE (Superly sexy unicorn lover @ Jun 7 2009, 08:02 AM) *
Only problem about method V the "spotlight" image will only follow oyu on the X axis and when you go left or right
the image dosen't move, and you go into a dark spot.(The part thats not transparent)
You have to make it to where the image will follow you at all times.
I have done it before but it involved a common event


I'm not sure what you mean by this. I tried Method V and I was able to get the spotlight to always follow the hero. It even follows correctly when I walk to the edge of the map, or when I evoke a "Transfer Player" event.

Perhaps you forgot the lines:
Variables[3] = Player's Screen X
Variables[4] = Player's Screen Y
Show Picture 1...
...at the top of page 2? (Before the Conditional Branch). Omitting these would cause the image to only display properly in the middle of the screen.

(->SR



Go to the top of the page
 
+Quote Post
   
Oceano
post Jun 7 2009, 01:33 AM
Post #4


I Shot The Sheriff
Group Icon


Type: Designer
Alignment: Unaligned




Here's the event i am using, and what i mean by the image isn't following me is that when i go
left or right it stays in whatever spot you moved down or up to.

Here's a image of my event:


--------------------

MISS MAY I
ROSE FUNERAL
EMMURE


Go to the top of the page
 
+Quote Post
   
VIII
post Jun 7 2009, 04:58 AM
Post #5


Sing me your soft sweet lullaby
Group Icon


Type: Writer
Alignment: Chaotic Neutral




What is on page two?

That is where your problem is, seeing as page one only checks where the player is when you push the button. Page two is where it follows.


--------------------



I love Ookie, and you should too! If you love Ookie, put this in your sig!


I love variables, and you can too! Get the variable fix here!

My stuff

Tutorials
Bulletxt's Tile Swapper
Pet system NOTE: this system uses variables and switches, for a great script strictly for pets, check out OriginalWij's Pet script here!
Torches, Spotlights, and Flashlights!

Resources
There's a little bit of everything in here!
Go to the top of the page
 
+Quote Post
   
VIII
post Jun 14 2009, 06:00 AM
Post #6


Sing me your soft sweet lullaby
Group Icon


Type: Writer
Alignment: Chaotic Neutral




Added new images!


--------------------



I love Ookie, and you should too! If you love Ookie, put this in your sig!


I love variables, and you can too! Get the variable fix here!

My stuff

Tutorials
Bulletxt's Tile Swapper
Pet system NOTE: this system uses variables and switches, for a great script strictly for pets, check out OriginalWij's Pet script here!
Torches, Spotlights, and Flashlights!

Resources
There's a little bit of everything in here!
Go to the top of the page
 
+Quote Post
   
MASH_MX
post Jun 14 2009, 07:25 AM
Post #7


"Everyone Is Unique In There Own Defined Way."
Group Icon


Type: Writer
Alignment: Chaotic Good




Nice VIII.
Good job on this, Not many people could figure this out on there own.
I did tho. tongue.gif


--------------------
My Projects:
My User bar for the thread is broken click this instead. >.> (Project XeroMX)

My new incoming Community Terraria Server! =)
Other:

Other People and things I support:
Spoiler:


Go to the top of the page
 
+Quote Post
   
VIII
post Jun 14 2009, 07:32 AM
Post #8


Sing me your soft sweet lullaby
Group Icon


Type: Writer
Alignment: Chaotic Neutral




It's not that complicated, it's just one of those things that seems to be asked about at least once a month. I got tired of either having to explain it, or seeing others have to explain it as well.

Thanks though smile.gif


--------------------



I love Ookie, and you should too! If you love Ookie, put this in your sig!


I love variables, and you can too! Get the variable fix here!

My stuff

Tutorials
Bulletxt's Tile Swapper
Pet system NOTE: this system uses variables and switches, for a great script strictly for pets, check out OriginalWij's Pet script here!
Torches, Spotlights, and Flashlights!

Resources
There's a little bit of everything in here!
Go to the top of the page
 
+Quote Post
   
Project14
post Jul 2 2009, 12:04 PM
Post #9



Group Icon


Type: Designer




Is there a way to active the torch through the items common event? ( Pressing button to turn on/off)

This post has been edited by Project14: Jul 2 2009, 12:05 PM


--------------------
Go to the top of the page
 
+Quote Post
   
VIII
post Jul 2 2009, 07:43 PM
Post #10


Sing me your soft sweet lullaby
Group Icon


Type: Writer
Alignment: Chaotic Neutral




I'm not quite sure what you are asking...

Do you want to have to go into your inventory and use the item to turn the effect on or off, or do you want to just push a button while you are playing the game to turn the light on or off?


--------------------



I love Ookie, and you should too! If you love Ookie, put this in your sig!


I love variables, and you can too! Get the variable fix here!

My stuff

Tutorials
Bulletxt's Tile Swapper
Pet system NOTE: this system uses variables and switches, for a great script strictly for pets, check out OriginalWij's Pet script here!
Torches, Spotlights, and Flashlights!

Resources
There's a little bit of everything in here!
Go to the top of the page
 
+Quote Post
   
Project14
post Jul 3 2009, 10:05 PM
Post #11



Group Icon


Type: Designer




QUOTE (VIII @ Jul 2 2009, 07:43 PM) *
I'm not quite sure what you are asking...

Do you want to have to go into your inventory and use the item to turn the effect on or off, or do you want to just push a button while you are playing the game to turn the light on or off?


Do you want to have to go into your inventory and use the item to turn the effect on or off - That one :3


--------------------
Go to the top of the page
 
+Quote Post
   
VIII
post Jul 4 2009, 07:11 AM
Post #12


Sing me your soft sweet lullaby
Group Icon


Type: Writer
Alignment: Chaotic Neutral




Then you want Method III; Requiring the player to activate their item.

Try reading before requesting...


--------------------



I love Ookie, and you should too! If you love Ookie, put this in your sig!


I love variables, and you can too! Get the variable fix here!

My stuff

Tutorials
Bulletxt's Tile Swapper
Pet system NOTE: this system uses variables and switches, for a great script strictly for pets, check out OriginalWij's Pet script here!
Torches, Spotlights, and Flashlights!

Resources
There's a little bit of everything in here!
Go to the top of the page
 
+Quote Post
   
Bobt97
post Aug 25 2009, 01:01 PM
Post #13


Is this okay mommy?
Group Icon


Type: Undisclosed
Alignment: Lawful Good




I'm using method V But the only buttons that work for turning the light on are up, down left and right, and since I kinda need those buttons for my character to walk, it causes some glitches, so how do I get the other buttons to work?


--------------------
seriously, what IS up with airline food?
---------------------------------------------------------------------------------------
Bobt97, a fat football player me and my friend made up, nothing like me
I support :
Spoiler:



other stuff:
Spoiler:

Cna yuo raed tihs?:
Spoiler:
Olny 55% of plepoe can raed this.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.


What video game character describes you? Version 2.0

My Results:

Pikachu You have an electric personality, and you are sooo cute when you`re angry! Most people will come to you at a party and you hate confined places, your favorite color is probibly yellow...

You are Link! You are the hero in every one of them! You always have an assistant too! You sometimes dave Zelda, and you hate Ganondorf! You made your first appearance in The Legend Of Zelda!

Quotes
Spoiler:
QUOTE
danyetman: Uhh, darksun? A word of friendly advice?

Do not taunt the mods. They will crush you.

Do not aggravate the mods. They will crush you.

Do not make any threatening gestures towards the mods. They will crush you.

Do not make any sudden movements around the mods. They will crush you.

And most of all, do not argue with the mods. Regardless of how wrong they may be, they are ALWAYS right. They can, and will, crush you. Quickly and painfully. ESPECIALLY Mr. Anonymous - he and PINEDAVX don't suffer fools. They carry around bansticks. And I've personally witnessed them doing an IP ban.

So, if I were you, I'd shut up, sit on my hands, and just accept being wrong. Because the mods...THEY WILL CRUSH YOU.
Go to the top of the page
 
+Quote Post
   
VIII
post Aug 25 2009, 05:17 PM
Post #14


Sing me your soft sweet lullaby
Group Icon


Type: Writer
Alignment: Chaotic Neutral




Bobt97, when playtesting your game, push F1 and check what buttons are assigned to what key on your keyboard. Then change the event button check accordingly.


--------------------



I love Ookie, and you should too! If you love Ookie, put this in your sig!


I love variables, and you can too! Get the variable fix here!

My stuff

Tutorials
Bulletxt's Tile Swapper
Pet system NOTE: this system uses variables and switches, for a great script strictly for pets, check out OriginalWij's Pet script here!
Torches, Spotlights, and Flashlights!

Resources
There's a little bit of everything in here!
Go to the top of the page
 
+Quote Post
   
aeonteam
post Oct 20 2009, 07:58 PM
Post #15



Group Icon


Type: Designer




Is there a way to make it so that one that just displays(Around, without buttons, just Player X,Y) to be lighter? Meaning not so 'solid black' like it allows you too see a little more outside of the spotlight?
Go to the top of the page
 
+Quote Post
   
VIII
post Oct 21 2009, 02:27 AM
Post #16


Sing me your soft sweet lullaby
Group Icon


Type: Writer
Alignment: Chaotic Neutral




Sure. You can do it one of two ways:

1. In the Show Picture command, choose a lower opacity than 255.
2. Import a graphic which has a lighter black (or whatever color you wish) background.


--------------------



I love Ookie, and you should too! If you love Ookie, put this in your sig!


I love variables, and you can too! Get the variable fix here!

My stuff

Tutorials
Bulletxt's Tile Swapper
Pet system NOTE: this system uses variables and switches, for a great script strictly for pets, check out OriginalWij's Pet script here!
Torches, Spotlights, and Flashlights!

Resources
There's a little bit of everything in here!
Go to the top of the page
 
+Quote Post
   
ica112
post Aug 30 2010, 09:21 AM
Post #17



Group Icon


Type: Undisclosed




Hi there.

First of all: thanks for this great tutorial, it really helps to add some more "life" to a map.
I just tried method I and got a real problem there: I can't move anymore!

Do you have any idea what could be the reason of this?

Edit:
Ah ok, solved it myself: The Event Trigger was set to "Action Button" by default laugh.gif

This post has been edited by ica112: Aug 30 2010, 10:38 AM
Go to the top of the page
 
+Quote Post
   
VIII
post Aug 30 2010, 12:36 PM
Post #18


Sing me your soft sweet lullaby
Group Icon


Type: Writer
Alignment: Chaotic Neutral




This is a helluva necropost for something you solved on your own shortly after posting. Next time try and be a little more thorough on your end before posting in such an old thread, k?


--------------------



I love Ookie, and you should too! If you love Ookie, put this in your sig!


I love variables, and you can too! Get the variable fix here!

My stuff

Tutorials
Bulletxt's Tile Swapper
Pet system NOTE: this system uses variables and switches, for a great script strictly for pets, check out OriginalWij's Pet script here!
Torches, Spotlights, and Flashlights!

Resources
There's a little bit of everything in here!
Go to the top of the page
 
+Quote Post
   
Croix Bartel
post Dec 3 2012, 11:54 AM
Post #19


Eventer, Amateur mapper, newbie scripter.
Group Icon


Type: Designer
Alignment: Neutral Good




Missing image. sad.gif


--------------------
We must appreciate what this world allows us to have.





I support:
Spoiler:

My game:


Visit my Vault of Mighty Poems: Bartel/Satyaloka Early Modern Poems
Go to the top of the page
 
+Quote Post
   
esperhunter
post Dec 4 2012, 08:52 PM
Post #20


*Officially dead* :(
Group Icon


Type: Artist
Alignment: Chaotic Neutral




QUOTE (Croix Bartel @ Dec 3 2012, 09:24 AM) *
Missing image. sad.gif

This topic is two years old. TWO. This necro would be useful save for the fact that every single image is missing.

Seriously, it's not that hard to just look at the date of the last posted comment.


--------------------


One of my current projects with an award-winning demo. Click to play!


Things I support
Spoiler:








Other stuff...
Spoiler:

If you are a believer of Jesus Christ and are 100% proud of it, put this in your sig.
If you are a pokemon fan...
Spoiler:




Go to the top of the page
 
+Quote Post
   

2 Pages V   1 2 >
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 23rd July 2014 - 08:18 AM

RPGMakerVX.net is an Privacy Policy, Legal.