The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.4.12 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5327 - File: inc/functions.php PHP 8.4.12 (Linux)
File Line Function
/inc/functions.php 5327 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



2DWorlds Forums
Regenerating Objects at the Click of a Button - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: Help (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=21)
+--- Thread: Regenerating Objects at the Click of a Button (/showthread.php?tid=3362)



Regenerating Objects at the Click of a Button - Sazaho - 04-15-2011

On my drinks making game, there are two regenerating buttons- one to regenerate the cup (which works), and one to regenerate the Ingredients (which doesn't work).

I've checked the scripts, they are both the same (aside from the model name, of course) but only one works. The model name in the "world" is the same as the model name stated in the script.

Anyone got any help?


RE: Regenerating Objects at the Click of a Button - Anti - 04-15-2011

Post the script please? :3

Oh, and you should post these topics to Scripting

Oh, and if you dont want to publish the script, just send me a PM D:


RE: Regenerating Objects at the Click of a Button - Sazaho - 04-15-2011

1. Okay

2. No, It's in help cos' I need help.

3. Nah, I'll post it here, just lemme get it


RE: Regenerating Objects at the Click of a Button - Anti - 04-15-2011

Scripting
Get scripting help here, and post your scripts.

Scripting is for everything with scripting.
That includes help topics (Get scripting help here...) :3
Help is for everything else xD


RE: Regenerating Objects at the Click of a Button - Sazaho - 04-15-2011

model = game.World.Ingredients
message = "Rebuilding..."

backup = model:clone()

enabled = true

link(script.Parent.Clicked, function(player, btn)
if not enabled then return end
enabled = false
script.Parent.Color = Color(127, 127, 127)

local copy = backup:clone()
model:remove()
game:message(message)
sleep(2)
game.TaskSchedulerConfusedchedule(function()
copy.Parent = game.World
copy:makeJoints()
end)
model = copy
game:message()
sleep(3)

enabled = true
script.Parent.Color = Color(0, 102, 255)
end)
(04-15-2011, 08:17 PM)Anti Wrote: Scripting
Get scripting help here, and post your scripts.

Scripting is for everything with scripting.
That includes help topics (Get scripting help here...) :3
Help is for everything else xD

K, K, whatever XP


RE: Regenerating Objects at the Click of a Button - Anti - 04-15-2011

I dont think that the ingredient parts are actually in Ingredients model... >_>

Oh, and when you regen the cup, the items in it will just fall down, but wont get removed Big Grin


RE: Regenerating Objects at the Click of a Button - Sazaho - 04-16-2011

The ingredients are part of a model, named Ingredients.

And yah, I have to work on that too Tongue