Darwin12
|
  |
| Joined: 08 Nov 2009 |
| Total Posts: 4395 |
|
|
| 11 Oct 2013 10:43 PM |
Hey guys.
I've been working for the last three days in my labs on trying to make a script for my new game where if users step into the light during daytime, they start to lose health. What i've gotten out of all of this is even more complexity, as the code i'm using requires a user to be within a brick radius to start losing health and that is not acceptable.
I'm trying to ask if there's a LUA API for lighting that could detect the light amount on the character (I'm not familiar there is) or if there's a solution to when the user walks into the light; that they start to lose health.
Help would be appreciated!
~ Darwin12 |
|
|
| Report Abuse |
|
|
Excellus
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 3939 |
|
|
| 11 Oct 2013 10:44 PM |
| Just put a giant brick outside that damages the Humanoid. |
|
|
| Report Abuse |
|
|
Darwin12
|
  |
| Joined: 08 Nov 2009 |
| Total Posts: 4395 |
|
|
| 11 Oct 2013 10:47 PM |
The issue is i'm working with a map that is massive. It's 2048x2048 baseplates stacked next to each other in rows of 30 by 30.
That doesn't seem at all effective for either editing or construction; and in addition, I need that to change by night so there is no damage at all.
Maybe you can help me; but I need that health script of damage to only affect the user during the hours of 7:00 to 19:00...
|
|
|
| Report Abuse |
|
|
Excellus
|
  |
| Joined: 17 Jun 2013 |
| Total Posts: 3939 |
|
|
| 11 Oct 2013 10:49 PM |
| But I don't really have an idea of how you would do that. |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 11 Oct 2013 10:50 PM |
I like the damage brick idea
local killerbricks = Workspace.KillerBrickModel:GetChildren ()
if TimeofDay >= 7:00:00 then killerbricks.KillScript.Disabled = false
elseif TimeofDay > 9:00:00 then killerbrick.KillScript.Disabled = true end
Good luck with the vampire game!
|
|
|
| Report Abuse |
|
|
Darwin12
|
  |
| Joined: 08 Nov 2009 |
| Total Posts: 4395 |
|
|
| 11 Oct 2013 10:50 PM |
| Yeah; it's a lot more complicated than it sounds. |
|
|
| Report Abuse |
|
|
Darwin12
|
  |
| Joined: 08 Nov 2009 |
| Total Posts: 4395 |
|
|
| 11 Oct 2013 10:52 PM |
Not exactly a vampire game ;)
I guess you could compare the game I'm making to "The Scorch Trials" if you've ever read it; it's a very similar environment. |
|
|
| Report Abuse |
|
|