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
 

Re: Can any of you help me solve a logic puzzle?

Previous Thread :: Next Thread 
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
01 Oct 2015 02:21 PM
So I'm creating 3 Objects Via ModuleScripts
Each one implements the previous
For example
C implements B implements A

A is a big list
B sorts that list, in order to create much of
C, interfaces using GUI to display items in A

How do I make when C is clicked, A recieves what C returns
then B and C are deleted?

Not looking for code. Just if anyone has any ideas on how to implement this, I'd be grateful
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
01 Oct 2015 02:23 PM
um what

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
01 Oct 2015 02:24 PM
You do know what object oriented programming is, right?
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
01 Oct 2015 02:27 PM
yeah but all this could be done so much more easily

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
01 Oct 2015 02:31 PM
How so? I've been looking for ideas
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
01 Oct 2015 02:32 PM
well if you were more specific and less general

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
01 Oct 2015 02:46 PM
I've really been specific

There are 3 objects created by modulescripts

Deck -- An object which contains many tables. This calls upon a function :search which creates a GUIBlock, waits for the click event of x amount of GUI objects, and removes the GUI's that were clicked from the deck by their associated indexes

The main Goal of this is to display all the tables in deck, wait for an amount of them to be selected, and then remove those tables from the deck and put them somewhere else

GUIBlock -- An object which uses the Deck object to create a GUI object for each table in Deck

GUI -- An object connected to a GUI that can be clicked. Each holds all the info from one of the tables of the Deck. It also holds an index of where it was in the Deck.

So when the MouseButton1down event fires on a GUI, the index of the GUI clicked is given back to Deck, and handle to be removed.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
01 Oct 2015 02:52 PM
and is there any specific reason why you need module scripts

all this could be done in one function

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
01 Oct 2015 03:01 PM
That would cause a mess.
I'm trying to make a card game here where objects are used all over. I need to be orderly

Anyways I think I found my solution: BindableEvents
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
01 Oct 2015 03:03 PM
that wouldnt cause a mess...

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
01 Oct 2015 03:04 PM
Make your ModuleScripts return the constructors and remember to use weak references.
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
01 Oct 2015 03:11 PM
What do you mean by return the constructors?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
01 Oct 2015 03:12 PM
You do know what object oriented programming is, right?
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
01 Oct 2015 03:13 PM
You do know what object oriented programming is, right?
see what I did there. xD

-The [Guy]
Report Abuse
BusyCityGuy is not online. BusyCityGuy
Joined: 17 Aug 2012
Total Posts: 2144
01 Oct 2015 03:13 PM
Darn ninjas. hahaha

-The [Guy]
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
01 Oct 2015 03:18 PM
...I mean every object has a constructor, but what do you mean by return the constructor?
Return to what? From What?

If I don't know something, pardon me. I need to know all I can to get it right.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
01 Oct 2015 03:24 PM
From your ModuleScripts. Make your ModuleScripts return the constructor.
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
01 Oct 2015 03:31 PM
Okay.
Already do that.

I thought I was going to die there
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
01 Oct 2015 03:32 PM
Well if they return the constructor then you should have no issue?

If you need to do cyclic dependencies, then put the variable as a blank local and spawn() a function to set it at the end just as you return the module.
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