Skip to content

Commit cf61a84

Browse files
committed
2 parents b7e0417 + 4a4d0f7 commit cf61a84

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/docs/Modding The Engine/Scripting/Custom options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ This is rather easy to do, put this in `./data/global.hx`:
6464
function create() {
6565
// FlxG.save is your mod's savedata
6666
if(FlxG.save.data.checkboxExample == null)
67-
FlxG.save.data.checkboxExample = "defaultValue";
67+
FlxG.save.data.checkboxExample = true;
6868
}
69-
```
69+
```

src/docs/Modding The Engine/Scripting/PlayState Scripts/Gameplay Scripts.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function create() {
1313
Or how to create a normal sprite:
1414
```hx
1515
function create() {
16-
var sprite = new FlxSprite(x, y).loadGraphic(Paths.image("my new sprite")) //picks the png image from the ./images folder
16+
var sprite = new FlxSprite(x, y).loadGraphic(Paths.image("my new sprite")); //picks the png image from the ./images folder
1717
}
1818
```
1919
If you notice, this looks slightly like source code, aside from the usual ``override function`` or ``super.create()``, which does not exist in our scripting language.<br>
@@ -27,8 +27,8 @@ Noting other particularities, Gameplay Scripting relies heavily on **Events**, w
2727
Which means, handling a note hit looks something like this:
2828
```hx
2929
function onNoteHit(event) {
30-
trace(event.note) // the note that has been hit
31-
trace(event.score) // how much score gained from this
30+
trace(event.note); // the note that has been hit
31+
trace(event.score); // how much score gained from this
3232
event.cancel(); // cancels out any other handling (useful if you want to write custom note pressing)
3333
}
3434
```
@@ -49,9 +49,9 @@ import flixel.addons.display.FlxBackdrop;
4949

5050
Characters are actually accessed differently. Due to the modularity of having more than one Strumline, and having more than one character in a Strumline, characters are accessible like this:
5151
```hx
52-
trace(strumLines.members[0].characters[0]) // opponent character
53-
trace(strumLines.members[1].characters[0]) // player character
54-
trace(strumLines.members[2].characters[0]) // girlfriend character
52+
trace(strumLines.members[0].characters[0]); // opponent character
53+
trace(strumLines.members[1].characters[0]); // player character
54+
trace(strumLines.members[2].characters[0]); // girlfriend character
5555
```
5656
Though we have also established a few shortcuts to avoid typing this much code
5757
```hx
@@ -66,4 +66,4 @@ Sections do not exists, and therefore, ``mustHitSection`` no longer works. But,
6666

6767
```hx
6868
if (curCameraTarget == 1) // mustHitSection == true
69-
```
69+
```

0 commit comments

Comments
 (0)