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: FilteringEnabled

Previous Thread :: Next Thread 
newcoolman2 is not online. newcoolman2
Joined: 01 Apr 2010
Total Posts: 2637
02 Nov 2016 11:49 PM
Is it bad to use only one RemoteEvent and RemoteFunction in the game.

I was looking at Phantom Forces code and He used two remote events and 1 remote function.

I currently am only using 1 of each. What would be the pros/cons of doing this.

Also what would be the pros/cons of using multiple remote events/functions for various tasks.


Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37141
02 Nov 2016 11:50 PM
lolwhat

I use a remote event for every function I have

so far... like10+ remote events xd
I have a spider on my back.
Report Abuse
newcoolman2 is not online. newcoolman2
Joined: 01 Apr 2010
Total Posts: 2637
02 Nov 2016 11:52 PM
I have a function table.

I send the name of the function as a argument.

The main function pulls the function name and calls it with the (...) parameter.
(forgot what thats called)

I mean it works but I just want to know if it's a bad thing to do.




Report Abuse
Salinas23 is not online. Salinas23
Joined: 28 Dec 2008
Total Posts: 37141
02 Nov 2016 11:54 PM
a function table?

so like... a module script?
I have a spider on my back.
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
02 Nov 2016 11:56 PM
called a tuple. and no, it's not inherently bad to do that, do what you want.

its a free country


Report Abuse
newcoolman2 is not online. newcoolman2
Joined: 01 Apr 2010
Total Posts: 2637
02 Nov 2016 11:58 PM
I mean yeah I could use a module but not really needed. local func={} function func.bla(player,...) return 1 end function #################### return "K" end local function event(player,name,...) func[name](player,...) end re.OnServerEvent:connect(event)--they all fall under one event this is how I am using it. but yeah not really the point lol
Report Abuse
newcoolman2 is not online. newcoolman2
Joined: 01 Apr 2010
Total Posts: 2637
02 Nov 2016 11:59 PM
I mean yeah I could use a module but not really needed.

local func={}

function func.bla(player,...)
return 1
end

function func.rea(player,...)
return "K"
end

local function event(player,name,...)
func[name](player,...)
end

re.OnServerEvent:connect(event)--they all fall under one event

this is how I am using it.


Report Abuse
newcoolman2 is not online. newcoolman2
Joined: 01 Apr 2010
Total Posts: 2637
03 Nov 2016 12:00 AM
thanks kodran. :)

and I thought i read somewhere it was called a varadiac parameter lmao whatever that means


Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
03 Nov 2016 12:03 AM
yeah, variadic function is a function which takes a variable number of arguments. The actual (...) is called a tuple.


Report Abuse
newcoolman2 is not online. newcoolman2
Joined: 01 Apr 2010
Total Posts: 2637
03 Nov 2016 12:04 AM
Ah thanks. Makes sense lol


Report Abuse
10MilesWide is not online. 10MilesWide
Joined: 06 Aug 2014
Total Posts: 2220
03 Nov 2016 04:15 AM
Yes it's good.
You should also put all your code in one script
Report Abuse
Exfiltrate is not online. Exfiltrate
Joined: 29 Mar 2013
Total Posts: 10917
03 Nov 2016 09:30 AM
22
Report Abuse
128Gigabytes is not online. 128Gigabytes
Joined: 17 Apr 2014
Total Posts: 3616
03 Nov 2016 09:52 AM
It depends how intesive all your functions are

Stuff like damage / heal / blind from flash bangs will be fine
But you don't want one script doing a ton of intensive things at once.
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