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 » Scripters
Home Search
 

Is there any way around this?

Previous Thread :: Next Thread 
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
25 Sep 2012 03:13 PM
Occasionally, when changing a value through multiple scripts, if the time in which the value is changed is close enough together, it doesn't change at all. So say you gain a small amount of money, but lose a large amount, nothing is lost because it happened at practically the same time. Is there any way around this, or any way to fix this?
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
25 Sep 2012 03:15 PM
use _G for calculating values and then update the value?
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
25 Sep 2012 03:17 PM
Is it only a problem when changing the value of something? If using shared would solve it, I would just remove the IntValue until I needed to do something locally.
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
25 Sep 2012 03:20 PM
ah yeah, nevermind what i said unless your managing points through a local script and were using the IntValue to share the points information with the server.
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
25 Sep 2012 03:48 PM
I figured I could just queue every change in any value through a single script. Now that I'm using locals, I can't use globals, so I send a value containing information into the game's main script and it reads and changes it from there.
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
25 Sep 2012 04:29 PM
Make a function attached to the value that will wait for any changes currently being made until it allows that script to change it, so basically like an update manager.
Report Abuse
Parthax is not online. Parthax
Joined: 27 Apr 2011
Total Posts: 6941
25 Sep 2012 09:33 PM
Have an Boolean that the adding and subtracting will wait for before changing the int. Then right before it changes the value of the int, set the Boolean to the opposite of what it needs to wait for, then add a wait() and change the bool back.

It hurt my head typing that >.<
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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