A downloadable asset pack

Download NowName your own price

v1.0.2 Initial release
v1.0.2s Fixed a bug when you use sub-graphics in your character!
        (use "install" button to update the script file too!)
v1.1.1 (OCT/18/2023)
 -Several bugs were fixed that made it impossible to update
   the light in real time.
 - C# call functions were added 
 - Updated to the latest version of Bakin 1.5

Description

With this plugin you can attach a light to your main character to illuminate your darkest maps, compatible with first person script and totally customizable!

This is an update for my first Bakin script :D!


How to install

  • Unzip "PlayerLight.zip" copy and paste "PlayerLight" folder to "steamapps\common\BAKIN\plugins".

  •  Go to functions -> Expanded features -> Player light .
  • Press "Install" button to install "PlayerLight.cs" script in your project.
  • Configure the plugin as you like (more info in How to use).
  • Press "Create vars" button to automatically create the necessary variables to use the plugin!


note: you can hover your mouse over each setting to see a quick explanation.

  • Attach "PlayerLight.cs" to a "Common Event"                                                                      (setting a trigger to this event does not affect the script)


How to use

Settings method

  • Static default method: 

Use the static numeric values in "Light Settings" this method is for those who want to use a single light setup throughout the game.

  • Custom method (RECOMMENDED)

Use this Custom method in "Light Settings" to set the names of the variables that you will use to configure the player light. (these names are the ones that the "create vars" function will take into account when using the button).

Note: light Color variable must be an array where:

(0 = Alpha, 1 = Red, 2 = Green, 3 = Blue)
  • Set method at run-time:

Use this method to toggle between the "static method" and "custom method" using a bakin string, set the string to "default" or "0" to use the static method or  "custom" or "1" to use the custom method that uses variables.


Note: Custom method is the most appropriate for most cases since it allows you to customize the light in real time using variables, in future updates the "light effects" will use the custom variables to work.

Compatibility options

  • Using FpView script: If you want to use player light with "Fpview" script, change this value to true!
  • Clean lights after exitThis option removes the player lights generated on the maps, it is highly recommended to leave this option enabled.
    (If you were using the old player light script you may see an error once the first time you close "playtest" after installing the plugin, this occurs because the editor does not update that the player's light was removed).

Other options

  • Disable switch: Name of a Bakin switch that when used will turn off the player's light.


  • Settings to use: This option is only available if you use "set method at-runtime", Name of a Bakin String to toggle between the "static method" and "custom method" set the string to "default" or "0" to use the static method or  "custom" or "1" to use the custom method that uses variables.


  • Fp offset: You can change the FIRST PERSON light offset to left (negative) or right (positive) by changing this value. This option is only available if you use "Fp script"(static and custom methods rules apply for both fields).


  • Static to vars: Name of a Bakin switch that when activated will copy all values set to "Static" to the Bakin variables of the player's light setup.

Custom method event config example:

You can change any value in real time using bakin events!

Light Type is a number between 0 and 1!

Light Color is a Bakin Array! (0 = Alpha, 1 = Red, 2 = Green, 3 = Blue).

The rest of variables is just numeric variables!


Notes

* If you find any bug, do not hesitate to let me know!

* This plugin is not paid, although I will appreciate any kind of support!

* This plugin only requires giving credits to me! (Jagonz) in your game. 

* Any questions I am always active in the official Bakin Discord or here in the comment section!


StatusReleased
CategoryAssets
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorJagonz
Tagsbakin, bakinplugins, bakinscripts, Indie, rpgbakin, rpgdeveloperbakin

Download

Download NowName your own price

Click download now to get access to the following files:

PlayerLight.zip 64 kB

Development log

Comments

Log in with itch.io to leave a comment.

Is it possible to modify the plugin to create lighting effects for fire? BAKIN's static light does not illustrate very well lighting a torch for example.

(1 edit)

I think this is possible with subgraphics and events, but I think I'm going to make an "event" light script, because some people are asking for that too!

Very nice! Can I implement it in my DLC?

Of course! just don't forget to mention me!

Can this be used for a commercial project? with credit and a donation, of course.

Yeah of course! and thank you for your support! :D