Skip to content

Commit 30197c4

Browse files
authored
Merge pull request #1 from adapap/master
Update
2 parents db39428 + 754cbf1 commit 30197c4

30 files changed

+2371
-2346
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__pycache__/
2+
.vscode/
23
Test/
34
temp.out
4-
Syntax.py
5-
To-Do.md
5+
node_modules/

Examples/arrays.owpy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ Rule "Advanced Arrays"
99
array.append(<1, 2, 3>)
1010
array.append(<6, 6, 6>)
1111
array3 = [1, "Rank B", "Rank A"]
12-
// for elem in array3:
13-
// Msg(Everyone, elem)
12+
for elem in array3:
13+
Msg(Everyone, elem)

Examples/basic.ows

Lines changed: 0 additions & 19 deletions
This file was deleted.

Examples/bezier.owpy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ Rule "Bezier Curve"
22
Event
33
On Global
44
Actions
5+
a = 0
6+
b = 1
57
c = floor(b) * 3
68
Chase Global Variable At Rate
7-
Visible_To: Everyone
89
Variable: a
910
Destination: a[c] * ((1 - b % 1)^3) + (((a[1 + c] * 3) * 3) * b % 1) * ((1 - b % 1)^2) + ((a[2 + c * 3] * 3) * (b % 1)^2 * (1 - b % 1) + a[3 + c * 3]) * (b % 1) * 3
1011
Rate: 0.2
11-
Reevaluation: Visible To Position And Radius
12+
Reevaluation: Destination And Rate

Examples/chase.owpy

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Rule "Chase Test"
2+
Actions
3+
pvar chase_var = 100
4+
Chase Global Variable At Rate
5+
Variable: chase_var
6+
Destination: 0
7+
Rate: -1
8+
Reevaluation: Destination And Rate
9+
Set Move Speed(Event Player, chase_var)

Examples/conditions.owpy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ Rule "Multiple Conditions"
44
Conditions
55
Distance Between
66
Event Player
7-
shop_portal
7+
<10, 20, 30>
88
<= 1.5
9-
pvar location == -1
9+
123 < 456

Examples/const.owpy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Rule "Constants for cleaner code!"
2+
Event
3+
On Each Player
4+
Actions
5+
const speed = 100
6+
Set Move Speed(Event Player, speed)
7+
// speed = 150 // const is immutable, so this causes an error

Examples/contains.owpy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ Rule "x in array?"
22
Event
33
On Global
44
Actions
5-
x = Event Player in Everyone
6-
y = 1 not in [1, 2, 3]
5+
a = Event Player in Everyone
6+
b = 1 not in [1, 2, 3]

Examples/for.owpy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Rule "For Loop"
1212
vertical: 45
1313
To World
1414
Msg(Everyone, "HEllo")
15-
// for i in range(3):
16-
// Msg(Everyone, i)
17-
// for player in Everyone:
18-
// Msg(player, "Hello")
15+
for i in range(3):
16+
Msg(Everyone, i)
17+
for player in Everyone:
18+
Msg(player, "Hello")

Examples/imports.owpy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#import "lib/child"
2+
3+
Rule "Debug Import"
4+
Actions
5+
debug_func("Hello!")

0 commit comments

Comments
 (0)