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: Really don't know what problem is - hurry?

Previous Thread :: Next Thread 
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
21 Dec 2013 03:28 PM



Quests = script.Parent.Quests
Quest = Quests:GetChildren()

function Change()
for i,v in pairs(Quest) do
if v.Value >= 1 then
Quests.Value = Quests.Value + 1
end
end
end

for i, v in pairs(Quest) do
v.Changed:connect(function() Change() end)
end
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
21 Dec 2013 03:36 PM
Bump
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
21 Dec 2013 03:37 PM
Nobody cares.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
21 Dec 2013 03:38 PM
@wubbzy301

WHAT

If you are not going to help, LEAVE.
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
21 Dec 2013 03:41 PM
"hurry?"
I can't solve that.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
21 Dec 2013 03:42 PM
Yes, I want to continue, so hurrying would be great. It would also be great if you would leave this forum instead of posting: "You are not a good scripter, learn it" or "Nobody cares". Scripting HELPERS are people who HELP people with fixing scripts. You aren't so leave.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
21 Dec 2013 05:05 PM
Bump, no need to hurry anymore but please respond.
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
21 Dec 2013 05:07 PM
Try this:

Quests = script.Parent.Quests
Quest = Quests:GetChildren()

function Change()
for i,v in pairs(Quest) do
if v.Value >= 1 then
Quests.Value = Quests.Value + 1
end
end
end

for i, v in pairs(Quest) do
v.Changed:connect(Change)
end
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
21 Dec 2013 05:12 PM
Problem is, the first time it neither changes.
Report Abuse
XtremeTemper is not online. XtremeTemper
Joined: 02 Mar 2012
Total Posts: 1774
21 Dec 2013 05:19 PM
Why not just make it check if a child was added then it will fire the function change()?

You want the script to basically fire the function change() when there is another "Quest" added? right? Are the quests like bricks or values? I need to know.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
22 Dec 2013 05:23 AM
Player
>Quest -- Value
>>Quest1 -- Values
>>Quest2
>>Quest3
Report Abuse
magnificentpurple132 is not online. magnificentpurple132
Joined: 15 Jun 2013
Total Posts: 535
22 Dec 2013 06:20 AM
sorry i cannot help but i would if i could.i only just started to learn how to script :)
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
22 Dec 2013 06:23 AM
Quests = script.Parent.Quests
Quest = Quests:GetChildren()

for i=1,#Quest do
Quest[i].Changed:connect(function()
if Quest[i].Value >= 1 then
Quests.Value = Quests.Value + 1
end
end)
end


i dont get it what are you trying to do to change awery quest number + 1 when each of them changes ??
Report Abuse
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
22 Dec 2013 06:26 AM
Quests = script.Parent.Quests
Quest = Quests:GetChildren()

for i=1,#Quest do
Quest[i].Changed:connect(function()
Quests.Value = 0
for i,v in pairs(Quests:GetChildren())do
if v.Value >= 1 then
Quests.Value = Quests.Value + 1
end
end
end)
end


if that one buggy try this one
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
22 Dec 2013 07:01 AM
Nope, this is what I'm trying to make:


Quests.Value ( How many there are active, 1 is able to get it 0 is you aren't able to get it. 2 or higher is when you've got it and/or did some progress in it.
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
22 Dec 2013 08:09 AM
y u use intvalues


Quests = {
KillOrcsQuest = { -- just an example
canget = false;
queststage = 1;
endstage = 10;
desc = "ORCS MUST DIE";
name = "Kill Orcs"
reward = {
gold = 50
item = "LinkedSword"
}
}
}


if Quests.KillOrcsQuest.canget == true then
currentquest = Quests.KillOrcsQuest
-- do quest acquiring stuff
if currentquest.queststage == currentquest.endstage then
-- do reward stuff
end

Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
22 Dec 2013 08:20 AM
That will come later in the GUI, this is for seeing how many active quests the player has.
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
22 Dec 2013 08:36 AM
A table would be easier to manage and exploiters have a harder time trying to change their stats
Report Abuse
Vermis is not online. Vermis
Joined: 02 Jan 2013
Total Posts: 11501
22 Dec 2013 08:40 AM
u mom
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
22 Dec 2013 08:41 AM
I could make TotalMoneyHad
TotalMoneySpend
TotalMoneyCurrently
if its not equal, you get kicked for hacking?
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
22 Dec 2013 09:04 AM
people can make scripts to get around
Report Abuse
Speedhax4r is not online. Speedhax4r
Joined: 26 Jun 2012
Total Posts: 81
22 Dec 2013 09:28 AM
Quests = script.Parent.Quests
Quest = Quests:GetChildren()

for f, p in pairs(Quest) do
p.Changed:connect(function()
for i,v in pairs(Quest) do
if v.Value >= 1 then
Quests.Value = Quests.Value + 1
end
end
end
end)
end
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
26 Dec 2013 10:20 PM
@Vermis
lol
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