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: What kind of a scripter are you?

Previous Thread :: Next Thread 
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
30 May 2014 05:51 PM
if keyboard.isDown("left") then
pos = pos + left
elseif keyboard.isDown("right") then
pos = pos + right
end

...OR...

if keyboard.isDown("left") then
pos = pos + left
end
if keyboard.isDown("right") then
pos = pos + right
end

Assume these work. What kind of a scripter are you? #1 or #2?
Report Abuse
badfitz99 is not online. badfitz99
Joined: 01 May 2010
Total Posts: 5854
30 May 2014 06:05 PM
I suppose #2

Anything you can do, a Asian kid half your age can do better! 'I am the greatest script in the realm. You can only hope to be as powerful of a script as I am, processing the world, bit by bit.' - Oysi 2014
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
30 May 2014 06:07 PM
For this situation, #2.
Report Abuse
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
30 May 2014 06:21 PM
#2, although I would prefer just taking the most recently pressed and executing that part of the code.
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
30 May 2014 06:27 PM
In this case, #2. Self-cancellation seems nice to me, personally.
Report Abuse
booing is not online. booing
Joined: 04 May 2009
Total Posts: 6594
30 May 2014 06:30 PM
Im a sink scripter
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
30 May 2014 06:57 PM
I have a strong, possibly irrational, aversion to elseif's.
Report Abuse
VanillaLight is not online. VanillaLight
Joined: 02 Nov 2013
Total Posts: 834
30 May 2014 07:51 PM
I like to do both just to make sure pos is what I want it to be and to confuse future readers of my code :)
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
30 May 2014 08:18 PM
1

:(
Report Abuse
noobertuber is not online. noobertuber
Joined: 16 Jan 2007
Total Posts: 2321
30 May 2014 09:14 PM
As bohdan implied, two could work better for this situation as the first and second if statements are not mutually exclusive. Option one weights the situation to "left." Unless, of course, you are trying to get some idea of how many scripters here would chose the unweighted option as opposed to differentiating between if-if and if-elseif users. I prefer using if-elseif in most situations but adopt as convenience dictates.

-God Bless-
Report Abuse
LuaSir is not online. LuaSir
Joined: 30 Mar 2014
Total Posts: 40
30 May 2014 09:32 PM
When using things that are not mutually exclusive, I hate the way the second looks, so I style it like

if condition then
--stuff
end if other condition then
--other stuff
end

It has the exact same width as

if condition then
--stuff
elseif other condition then
--other stuff
end

So it is visually pleasing.
Report Abuse
Developmentals is not online. Developmentals
Joined: 15 May 2014
Total Posts: 990
30 May 2014 10:15 PM
I'd use 1, #not_special
Report Abuse
Insoul is not online. Insoul
Joined: 04 May 2014
Total Posts: 66
30 May 2014 10:38 PM
Id have to go with one just cause it's much more 'ok'

herro Im syKo
Report Abuse
VirtualPrince is not online. VirtualPrince
Joined: 17 Oct 2013
Total Posts: 7386
30 May 2014 10:55 PM
#2 all the way
Report Abuse
Tflipz is not online. Tflipz
Joined: 04 Nov 2013
Total Posts: 4159
31 May 2014 12:42 AM
Eh...
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
31 May 2014 03:29 AM
In most situations, #1.
Why run useless checks...
Report Abuse
AMasterProgrammer is not online. AMasterProgrammer
Joined: 02 Apr 2013
Total Posts: 1608
31 May 2014 03:48 AM
KEES = {}

ypos = 0
xpos = 0

Mouse = game.Players.LocalPlayer:getMouse()


Mouse.KeyDown:connect(
function(key)
KEES[key] = true
end
)


Mouse.KeyUp:connect(
function(key)
KEES[key] = false
end
)

game:getService("RunService").RenderStepped:connect(
function()
if KEES.w then
ypos = ypos + 1
elseif KEES.s then
ypos = ypos - 1
end
if KEES.a then
xpos = xpos - 1
elseif KEES.d then
xpos = xpos + 1
end

[insert character var].Position = UDim2.new(0, xpos, 0, ypos)
end
)
Report Abuse
OneTrueGodTheHolyCow is not online. OneTrueGodTheHolyCow
Joined: 24 Oct 2013
Total Posts: 9350
31 May 2014 04:23 AM
#2 because #1 prefers left to right...

oh wait that's a good thing, never mind, #1

lefties unite!1!!!
Report Abuse
As8D is online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
31 May 2014 11:18 AM
#1 cuz I don't read the whole OP before I answer, and looking at comments, I assume that people choosing #2 are right-handed.

lefties unite!1!!! - As
Report Abuse
Jetta765214 is not online. Jetta765214
Joined: 22 Oct 2008
Total Posts: 1855
31 May 2014 11:29 AM
Answer 2 for 2 reasons.

First, it allows you to press 2 keys at once, and have the effect nullilified, It makes the game more interesting that way.

Second, the values can be different, which makes an interesting gameplay, such as holding down both left and right and decrease your normal speed in a certain direction, instead of going the same way linearly.


Alt. of Jetta765214
Report Abuse
CoolioTree is not online. CoolioTree
Joined: 26 Dec 2012
Total Posts: 2509
31 May 2014 11:36 AM
#1
Report Abuse
CoolioTree is not online. CoolioTree
Joined: 26 Dec 2012
Total Posts: 2509
31 May 2014 11:36 AM
im a righte btw
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
31 May 2014 02:49 PM
1
Report Abuse
Maradar is not online. Maradar
Joined: 06 Mar 2012
Total Posts: 4478
31 May 2014 03:14 PM
neither.
usually i do this

pootis = true
pootis2 = true

function choice3()
if pootis == true then wait(1) else error("hi") then wait(1)
if pootis2 == false then wait(1) else error("darn") then wait(1)
end
Report Abuse
oseday is not online. oseday
Joined: 27 Aug 2008
Total Posts: 1308
31 May 2014 03:27 PM
2nd because both might be pressed at once.
but in most situations I use 1st.
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