Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

E2 Functions

Wire E2 Functions and what they do (Garry's Mod)

Function/UsageAction
interval(N) Runs the E2 code every N ammount of milliseconds (minimum delay is 10 milliseconds)
runOnTick(N) Runs the E2 code every N game tick(s)
if (A) {B = C} Checks if the conditional in the parentheses is true, and if it is, it does the code in the brackets
elseif (D) {E = F} If the if(){} conditional DIRECTLY ABOVE is false, this check if the conditional in the parentheses and if it is true, runs the code in the brackets.
else {G = H} If the if(){} conditional is false, and the optional elseif(){} is false, runs the code in the brackets
chatClk() Returns 1 if someone sends a chat message. (can input a player entity in the parentheses to make it only work with that person's chat)
print(S) prints the string S to the owner's chat
conditionals: ==, !=, |, &, >=, <=, >, is, is not, or, and, greater than or equal to, less than or equal to, greater than, less than
abs(N) Returns the magnitude (absolute value) of N
ceil(A,B) Rounds A up to the optional argument B' decimal postion
floor(A,B) Rounds A down to the optional argument B's decimal position
round(A,B) Rounds A to the optional argument B's decimal position
sqrt(N) Returns the square root of N
cbrt(N) Returns the cube root of N
root(A, B) Returns the B'th root of A
exit() Stops the chip from executing any code after it
reset() Resets the chip, acts like respawning it
S:index(N) Returns Nth letter of the string S (as a string)
S:length() Returns the length of the string S
S:upper() Returns string S in all uppercase
S:lower() Returns string S in all lowercase
S:sub(A,B) Returns a substring of S between points A and B
S:explode(A) Returns an array of strings. (A says where to split the strings) [EX: Text1:explode(" "), this will return each word as a seperate string]
hint(S,N) Displays string S as a hint for N seconds (N is clamped between 0.7 and 7)
print(S) Prints string S to your chat, only visible to you
selfDestruct() Makes the expression delete itself
selfDestructAll() Makes the expression delete itself and all constrained objects
entity(N) Returns the entity associated with the numeric i.d. N (remove N to make the chip return itself)
owner() Gets the owner of the expression
E:id() Returns the numeric i.d. of entity E
noentity() Returns an invalid/nil entity
curtime() Returns the current game time since server start in seconds (can be effected by lag)
stoptimer(S) stops timer S [an stop interval with stoptimer("interval")]
clk(S) Returns 1 if the current execution was caused string S [clk() returns 1 if the execution was caused by interval()]
toUnit(S,N) Converts N from Gmod units to S units
fromUnit(S,N) Converts N from S units to Gmod units
convertUnit(A,B,N) Converts N from A units to B units
lastSaid() Returns what was last said in the chat log [owner():lastSaid() returns what you said last]
tickClk() Returns 1 if the current code execution was caused by runOnTick()
realtime() Returns the current real time since server start. (Will not get affected by lag)
map() Returns the current map
hostname() Returns the name of the server
gamemode() Returns the server's gamemode
gravity() Returns player gravity (in the negative Z direction)
propGravity() Returns prop gravity
time(S) Returns numerical time/date info from the server. Possible arguments: "year", "month", "day", "hour", "min", "sec", "wday" (weekday, Sunday is 1), "yday" (day of the year), and "isdst" (daylight saving flag 0/1)
E:getConstraints() Returns an array with all entities directly or indirectly constrained to E, except E itself
E:hasConstraints() Returns the number of the constraints E has
E:hasConstraints(S) Returns the number of the constraints E has with the given constraint type
E:isConstrained() Returns 1 if E has constraints, 0 if not
hideChat(N) If N isn't 0, hide the chat message that is currently being processed.
lastSpoke() Returns the last player to speak.
holoRemainingSpawns() Returns how many holos you can spawn before you reach the limit
holoDelete(N) Deletes the holo with the index N
Created by: Rosie1211
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards