generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Developing HOTIR And i need some help.

Previous Thread :: Next Thread 
Rencedalas is not online. Rencedalas
Joined: 05 Jul 2010
Total Posts: 930
01 May 2012 04:04 PM
Okay, so im developing a script i call a HOTIR, it stands for Heal Over Time In Range.
So basically, im trying to get the script to work and heal the player for being within a certain range of a model or block for a set amount of hp every like....2 seconds, i have included a Range value with the script and a variable pointing to the Range value and its value for the distance away you have to be. but i am having problems getting it to work. the Output box is telling me i cannot have multiple group ID's so i fixed that and re-ran the script and it came up with another problem, so i fixed that and it came up with yet another problem so i eventually gave up and came here.
if you can fix the script or want to try and fix the script, please visit my models and take the HOTIR model. i would greatly appreciate if someone fixes this script so that i can use it to better enhance my places. if you end up fixing the script so that it properly heals you only when you are within range of the item please PM me so that i can receive the script.
Report Abuse
MrMcAero is not online. MrMcAero
Joined: 21 Apr 2012
Total Posts: 671
01 May 2012 04:11 PM
Post script and output log here.

- Cheers!
Report Abuse
NeonBlox is not online. NeonBlox
Joined: 19 Oct 2008
Total Posts: 1462
01 May 2012 04:18 PM
healer = game.Workspace.HealBlock
maxdistance = 10
healthbonus = 2

while wait(2) do
for i, plr in pairs(game.Playes:GetPlayers()) do
mag = (plr.Position - healer.Position).magnitude
if mag < maxdistance and plr.Character.Humanoid.Health < plr.Character.Humanoid.MaxHealth then
plr.Character.Humanoid.Health = plr.Character.Humanoid.Health + healthbonus
end
end
end

May not work, but it's worth a shot.
Report Abuse
Rencedalas is not online. Rencedalas
Joined: 05 Jul 2010
Total Posts: 930
01 May 2012 04:34 PM
Mmk... I'll try it
Script and Output Log are coming right up
Report Abuse
Rencedalas is not online. Rencedalas
Joined: 05 Jul 2010
Total Posts: 930
01 May 2012 04:36 PM
Heres The output Log :

17:35:53 - Workspace.Assassins Brigade battle Standard.Battle Standard:1: ')' expected near ','

Heres The Script :

Groups = (150631, 277680, 538849, 213339, 237373, 191104, 196234)
range = script.Parent.Range.Value

wait(1)
while true do
if (torso.Position-bin.Position).magnitude <= range and p:IsInGroup(Groups) then
local humanoid = part.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
humanoid.Health = humanoid.Health +15
wait(2)
end
end
Report Abuse
Rencedalas is not online. Rencedalas
Joined: 05 Jul 2010
Total Posts: 930
01 May 2012 04:56 PM
Bump...lol...
Report Abuse
Rencedalas is not online. Rencedalas
Joined: 05 Jul 2010
Total Posts: 930
02 May 2012 04:58 PM
can anyone help?
Report Abuse
DeVinci is not online. DeVinci
Joined: 21 Jul 2010
Total Posts: 338
02 May 2012 05:01 PM
Instead of having 1000+ lines of the same code, use a while true do with an if statement to see if the players health isnt maxed, and if range, and both are true, then heal.
Report Abuse
Rencedalas is not online. Rencedalas
Joined: 05 Jul 2010
Total Posts: 930
02 May 2012 05:02 PM
Mmmk so then the 1 line of heal will repeat until they are max health.
Report Abuse
DeVinci is not online. DeVinci
Joined: 21 Jul 2010
Total Posts: 338
02 May 2012 05:14 PM
Yes.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image