Table of Contents

orphaned by choice
still a WiP-page
rough goals
handling of WiPness
CubeScript in 3 weeks
Prepared?
Usage
Week-1
Day-1
Motivation
Goal
Walk-Through
Day-2
Week-2
Day-8
Motivation
Goal
Walk-Through
Week-3
Day-15
Motivation
Goal
Walk-Through
Day-21

orphaned by choice

see below for Why ?.

still a WiP-page

This page is still Work in Progress

rough goals

merge the information from the two branches about CubeScript currently in this wiki out from this central reference;
not required to be riggidly followed by a reader;
but by the ordering into a 3-week course,
someone hunting for ideas/queues/reference/samples about anything..
*from an introduction - e.g. start reading till you start skipping on your own
*or for intermediary stuff, like your first own MouseWheel modifier
*right up to advanced stuff, where in-depth knowledge about @ or $arg1-and-friends might get those bits of the puzzle rattling around a Scripters' mind to fall into place.
..will find the right pages to look at quickly.

handling of WiPness

I guess subsections will only contain teasers and any "real" content happens on dedicated pages;
initially we should maybe try sketching out the progression of the 3 weeks in kind-of waves,
let's not touch 3rd-week till week-#1 is standing pretty solid, for example,
or something like that anyway - let's try to logically build up from day #1

CubeScript in 3 weeks


Prepared?

This section should contain a quick to check/discard list of pages one should be at least aware of.
JadeMatrix's Cubescript Tutorial Chapter 1Chapter #1, Using the Console and parts of Scripting Guide, ...

Usage

An explanation of the hierachy -the one we'll have eventually-
of how to begin, peruse or scan this part of the wiki.

If it's intricate stuff it might first become clear by reading in Week-3 ...
if it's about more basic matters it'll probably already have been discussed earlier.

Week-1

Day-1

Motivation

So you find your repeating the same commands over and over,
and you've tired of using history for a currently prominent block of commands.
You want to create a MouseWheel toggle for something for example,
or you could live with a simple keybind ... or you want to perform the same task on a mass of entities ... or, or, or.
Always remember that the power of CubeScript may often hold a suprise - even for the developers of the parser themselves!
It's flow-control structures combined with the (extendable! see:Modding Guide) get-/set-functions make the body of possible applications impossible to count ;-)

Goal

For starters we'll handle a simple keybinding scenario:

direct gun control

Often players coming from other fps-games find the way weapon selection works unsatisfactory.
The closest sauebraten's engine can come would be by putting this code at the end of your autoexec.cfg
bind 0 "weapon 0 0 0"
bind 1 "weapon 1 0 0"
bind 2 "weapon 2 0 0"
bind 3 "weapon 3 0 0"
bind 4 "weapon 4 0 0"
bind 5 "weapon 5 0 0"
bind 6 "weapon 6 0 0"

entproperty control

We'll handle the MouseWheel function now;
let's think about entity properties ...
... so we need a multiplier-alias to know wether ..TODO?.. at which factor?!?! ..TODO?.. to scroll fast or at regular speed.
Then we need an alias named game_modifier_n - where n is an appropriate index,
this is the function that get's passed +1 or -1 depending on wether the user scrolled up or down [ orientation? ] .
Last - but not least - we need a keybinding, that will make the function accesible in-game.
my_scroll_multiplier = 1
my_scroll_multlistof = "1 2 5 10 100"
game_modifier_440 = [
  // TODO: clean CubeScript
]

Walk-Through

[...] the clean CubeScript mentioned above, with some explanation along the way [...]

Day-2

[...]

Week-2

Day-8

Motivation

[...] going deeper ... probably somewhere along JadeMatrix's Cubescript Tutorial Chapter 4Chapter #4

Goal

[...]

Walk-Through

[...]

Week-3

Day-15

Motivation

[...]

Goal

[...]

Walk-Through

[...]

Day-21

...some last words, perhaps?!?