Jump to content

Recommended Posts

Hello, I need help with a question I have if someone could help me that would be great :D! So, what I want to do when my character's in a certain mode I want him to blink with yellow light :)! Well... That might be hard to understand let me try to say it easier...

Uh, what I mean is i'd like my character to go max of this light

act.target.Light:SetRadius(.30)
act.target.Light:SetFalloff(0.90)
act.target.Light:SetIntensity(.30)

and then go give off 0 light and then it goes back to the light above every 1 second (by .01 point so it looks smooth transition) like it keeps repeating while she's in for example "act.target.lightblink_mode = true"

I want to know would that be possible even? If someone could tell me or help me I would really be happy :)!!! Thanks a lot for reading my problem, I hope you have a wonderful day/night :D!

PS. If you do help me can you also tell me what does "act.target.Light:SetColour(255 / 255, 255 / 255, 255 / 255)" have to be to give off the color yellow, thanks! xD

Edited by SuperDavid

@SuperDavid For color try something like this: http://drpeterjones.com/colorcalc/

For blinking,

inst._blinktask = inst:DoPeriodicTask(1, function(inst)
	inst._lightenabled = not inst._lightenabled
	inst.Light:Enable(inst._lightenabled)
end)
--when you want to cancel it:
inst._blinktask:Cancel()

Note that death and resurrection also reset the parameters for the light.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...