|
| 09 Nov 2011 08:28 AM |
Using parts/tables/idkFUNCTIONS??? as keys in tables, way faster than looping thru table to find data related to the thing. ___________________ local tab={}
function SetData(a,b) tab[a]=b end
function GetData(a) return tab[a] end
SetData(part,"hai")
print(GetData(part))
>hai ___________________
When you has table, and stuff goes in and out (assuming youre using numerical indices), and you wanna insert something, instead of looping thru to find a free slot, put the free slots in another table when removing stuff. Assuming you cant use insert and remove because you use the table indices to access the data. _____________________________ local tab={} local free={}
function add(data) if #free>0 then tab[free[#free]]=data free[#free]=nil else tab[#tab+1]=data end end
function remove(index) tab[index]=nil free[#free+1]=index end
______________________________
chu use delay(timetorunfuncafter,func) to run multiple loops in script instead of messy coroutines ______________________________ local a=0 delay(0,function() while true do wait() a=a+1 end end)
delay(0,function() while true do wait() print(a) end end)
>1 >2 >3 >4 >5 >H4x umg 3rr0r pl0x _________________________________
Chu use cframe:toObjectSpace and cframe:toWorldSpace
________________________ CFrame:pointToWorld/ObjectSpace(vector3) --objectspace returns where the point is when looking from cframes pos and rotation, worldspace returns what point is in world after moving it from the objects "view" to world spaic.
toWorld/ObjectSpace(cframe) does the same on cframes but with rotation ________________________
|
|
|
| Report Abuse |
|
|
|
| 09 Nov 2011 03:51 PM |
except my internet connection is so poor that no matter how many milliseconds you knock off it's still slow for me :(
- HIDE the EGG. Dube. |
|
|
| Report Abuse |
|
|
Slizerd
|
  |
| Joined: 15 Jun 2011 |
| Total Posts: 113 |
|
| |
|
XlegoX
|
  |
| Joined: 16 Jun 2008 |
| Total Posts: 14955 |
|
|
| 09 Nov 2011 05:06 PM |
You can see a really fancy usage of this in my RTS pathfinder demo: http://minus.com/ddWwkm.love
All of the nodes in the map store their adjacent nodes using this technique. Doing it normally is easily 2x as slow to update the map after a node is split or joined. |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2011 05:09 PM |
has xlegox always had the moderator tag under his character
o-o |
|
|
| Report Abuse |
|
|
Sorcus
|
  |
 |
| Joined: 29 Nov 2010 |
| Total Posts: 3775 |
|
|
| 09 Nov 2011 05:10 PM |
He just became a Moderator ;)
~Sorcus |
|
|
| Report Abuse |
|
|
| |
|
Sorcus
|
  |
 |
| Joined: 29 Nov 2010 |
| Total Posts: 3775 |
|
|
| 09 Nov 2011 05:13 PM |
I also have the mod tag, yay me!!
~Sorcus |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2011 05:28 PM |
Grats mah boi :D
Also, good job Sorcus. Ya special lil guy :3 Now fix the wiki.
"I WILL GIVE YOU BACON." - Deadmau5 ~Scarfacial |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2011 05:31 PM |
>xLEGOx reinstated as mod >Scripters forum quality improves drastically
I HAVE LONG AWAITED THIS DAY! |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2011 05:44 PM |
xLEGOx is going to be a mod again? Yay!
We just need Anaminus back as a mod too and this forum's quality is going to go up a lot! =D |
|
|
| Report Abuse |
|
|
Slizerd
|
  |
| Joined: 15 Jun 2011 |
| Total Posts: 113 |
|
|
| 09 Nov 2011 06:15 PM |
:o
Can I be a mod too?
*waits for someone to comment on how I'm banned as I ask this* |
|
|
| Report Abuse |
|
|
Davidii
|
  |
| Joined: 17 Jul 2008 |
| Total Posts: 1282 |
|
|
| 09 Nov 2011 06:21 PM |
| Dude, you realize you're banned, right? |
|
|
| Report Abuse |
|
|
aboy5643a
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 2785 |
|
|
| 09 Nov 2011 06:25 PM |
| Finally they made him a moderator!! :D Is he hired as staff or is he just a volunteer? |
|
|
| Report Abuse |
|
|
Sorcus
|
  |
 |
| Joined: 29 Nov 2010 |
| Total Posts: 3775 |
|
| |
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
| |
|
| |
|
|
| 09 Nov 2011 08:03 PM |
xLEGOx is a moderator again?
Oh, joy! |
|
|
| Report Abuse |
|
|
stephen5
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 6676 |
|
|
| 09 Nov 2011 08:38 PM |
| XlegoX, isn't using offsite links a no - no? |
|
|
| Report Abuse |
|
|
fiht345
|
  |
| Joined: 24 Apr 2008 |
| Total Posts: 7216 |
|
|
| 09 Nov 2011 08:41 PM |
i have a moderator tag.
oh wait.
Do I? who knows |
|
|
| Report Abuse |
|
|
|
| 09 Nov 2011 10:02 PM |
ROBLOX finally went back to player mods. HURRAH. Unfortunately, it will be denied. How sad.
Maybe I'll start REALLY foruming here. |
|
|
| Report Abuse |
|
|
ninga95
|
  |
| Joined: 16 Jul 2008 |
| Total Posts: 5026 |
|
|
| 09 Nov 2011 10:20 PM |
Good job xLEGOx!! I'm glad you earned your position as a forum moderator yet again. Good luck and hope you keep this forum under control correctly. Hopefully the spam will be more less since we got xLEGOx back as a moderator. :)
*I should quit roblox right? I don't know!* |
|
|
| Report Abuse |
|
|