Garry's Mod

Garry's Mod

[E2] G64 Core
 This topic has been pinned, so it's probably important
Denneisk  [developer] 2 Jun, 2023 @ 7:06pm
Documentation
If anything's missing from here, it's likely mentioned in the E2Helper descriptions!

Music


g64PlayTrack(n), g64PlayTrack(s)
Plays one of the tracks (music) for all players by index or name. The index is equal to the position as seen in the menu, and the name is the exact same as you see it in the menu!

g64StopAllTracks()
Stops all tracks for all players.

g64PlaySound(s), g64PlaySound(sn), g64PlaySoundRaw(n)
Plays a sound based on https://github.com/ckosmic/g64/blob/master/lua/includes/g64_types.lua#L476. g64PlaySoundRaw(n) is only for those experienced with SM64.

Mario


e:g64MakeMario(), g64MakeMario(e)
Turns a player into a G64 Mario.

e:g64RemoveMario(), g64RemoveMario(e)
Turns a player back into normal, if he's Mario.

Health


e:g64MarioHealth(), e:g64MarioHealth(n)
Gets or sets the player's health as mario. Getting is equivalent to doing e:health().

e:g64MarioDamage(n), e:g64MarioDamage(nv)
Damages the player for the amount of health, with an optional local damage origin relative to the player (i.e., in front of the player is vec(1, 0, 0)).

e:g64MarioHeal(n)
Heals the player for the amount of health.

Lives


e:g64MarioSetLives(n)
Sets the player's lives to the number.

e:g64MarioAddLives(n), e:g64MarioRemoveLives(n)
Adds or removes the amount of lives to the player.

Caps


e:g64MarioEnableCap(s), e:g64MarioDisableCap(s)
Enables or disables the cap for the player. Disabling the cap does not reset the music. Valid strings are "wing", "metal", and "vanish".

Color


e:g64MarioColor(nv)
Temporarily colors the body part index of Mario with the vector color. The body part index is in the same order as you see in the Settings menu.

Position


e:g64MarioSetPos(v), e:g64MarioGetPos()
Gets or sets Mario's position.

e:g64MarioTeleport(va)
Teleports Mario instantly to the position. This should be equivalent to SetPos, but may be more reliable.

Spawning


g64Spawn1Up(v), g64SpawnCoin(v), g64SpawnRedCoin(v), g64SpawnBlueCoin(v)
Spawns the associated item at the position.

g64SpawnCap(vs)
Spawns the 'wing', 'metal', or 'vanish' cap at the position.
Last edited by Denneisk; 7 Jun, 2023 @ 1:05am