X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.wiki.git;a=blobdiff_plain;f=Programming-QuakeC-stuff-in-Xonotic.md;h=10d48caf5dc5655067e950decaa3abad2d8ea42e;hp=84ac404fd43fc70d3148e96f6344e1c7a73be0fb;hb=52f2c3f96b06d44b9b89b224739bcaf170890bfb;hpb=fc6169e6838516ca634a9c1923e2bbcc570854dd diff --git a/Programming-QuakeC-stuff-in-Xonotic.md b/Programming-QuakeC-stuff-in-Xonotic.md index 84ac404..10d48ca 100644 --- a/Programming-QuakeC-stuff-in-Xonotic.md +++ b/Programming-QuakeC-stuff-in-Xonotic.md @@ -30,6 +30,10 @@ Example: `sv_campcheck` is clearly a server cvar (**sv_*** cvars are server cvar Example: `cl_chatsound` is clearly a client cvar (**cl_*** cvars are client cvars), only can be declared inside a **`#ifdef CSQC`** block. +- **hud_*** cvars: + +Example: `hud_progressbar_alpha` is a client cvar (**hud_*** cvars belong to client cvars), only can be declared inside a **`#ifdef CSQC`** block. +
@@ -37,6 +41,8 @@ Example: `cl_chatsound` is clearly a client cvar (**cl_*** cvars are client cvar ### How to use MUTATOR functions: +You can look the following link if you're trying/testing your own mutator: [Writing your first mutator](writing-your-first-mutator) + **Attention:** to use a hook, first register your mutator using `REGISTER_MUTATOR`, then create your function using `MUTATOR_HOOKFUNCTION`. @@ -284,12 +290,33 @@ Making gamemodes doesn't seem easy. There's a little explanation of what does ea ## Samples -There are good examples of the commits of the people who developed gamemodes: +There are good examples of the commits and repositories of people who developed gamemodes: + +- [**Lyberta's GunGame gametype commits**](https://gitlab.com/xonotic/xonotic-data.pk3dir/-/merge_requests/482/diffs) + +Taken from: https://forums.xonotic.org/showthread.php?tid=7314 + +You can look and test the [**Lyberta's GunGame gametype repository**](https://gitlab.com/xonotic/xonotic-data.pk3dir/-/tree/Lyberta/GunGame) + +- [**How Survival gamemode was developed (first commit)**](https://gitlab.com/xonotic/xonotic-data.pk3dir/-/commit/8f61a40877542ac94baa74c5ed653c77b77bd855) -- [**Lyberta's GunGame gametype**](https://gitlab.com/xonotic/xonotic-data.pk3dir/-/merge_requests/482/diffs) (Taken from: https://forums.xonotic.org/showthread.php?tid=7314) +It's recommended use the final product in this [**repository**](https://gitlab.com/xonotic/xonotic-data.pk3dir/-/tree/Mario/survival). Many changes have been influenced. -- [**How Survival gamemode was developed (first commit)**](https://gitlab.com/xonotic/xonotic-data.pk3dir/-/commit/8f61a40877542ac94baa74c5ed653c77b77bd855) (It's recommended look the final product in this [**repository**](https://gitlab.com/xonotic/xonotic-data.pk3dir/-/tree/Mario/survival)) [**SMB modpack repository**](https://github.com/MarioSMB/modpack/tree/master/mod/common/gamemodes/survival) has added Survival gamemode and others. +# Effects + +Spawns effect particle in-game. + +The effects can be used with `Send_Effect(effect, org, vel, howmany)` function to test the effects from [**qcsrc/common/effects/all.inc**](https://timepath.github.io/scratchspace/d9/d95/effects_2all_8inc_source.html) + +**Send_Effect** function definition is inside: [**qcsrc/common/effects/effect.qh**](https://timepath.github.io/scratchspace/d5/de6/effect_8qh_source.html) + +For example, you can test the smokes, using `EFFECT_SMOKE_LARGE`: +```c +Send_Effect(EFFECT_SMOKE_LARGE, this.origin, '0 0 0', 1); +``` + +EFFECT list: [**qcsrc/common/effects/all.inc**](https://timepath.github.io/scratchspace/d9/d95/effects_2all_8inc_source.html)
\ No newline at end of file