-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path36440ols_deserttree.cos
101 lines (94 loc) · 1.68 KB
/
36440ols_deserttree.cos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
**
** Desert tree thing.
** Open source, do whatever you want with the code/images. No need to credit.
** Pilla
**
*
* CAOS2PRAY CHUNK
*# Pray-File "ols_deserttree.agents"
*# DS-Name "OLS Desert Tree"
*# attach ols_deserttree2.c16
*# desc = "A tree that spawns nuts."
*# Agent Animation File = "ols_deserttree2.c16"
*# Agent Sprite First Image = 0
*# Agent Animation Gallery = "ols_deserttree2"
*
*
* 36440 = custom species number
* Objects:
* 2 4 36440 - Tree
* 2 7 36440 - Flower
* 2 3 36440 - Seed
* Scripts:
* 2 4 36440 1 - Tree dispenser
* 2 4 36440 9 - Tree timer
* 2 7 36440 9 - Flower timer
* 2 3 36440 9 - Seed timer
* 2 3 36440 12 - Seed eat
*
*
*
*
** Create the tree (attr: invisible 16)
new: simp 2 4 36440 "blnk" 1 0 0
attr 16
bhvr 0
perm 100
accg 30
elas 0
fric 100
mvsf 31186 12808
tick 1
** The tree timer script
scrp 2 4 36440 9
tick rand 400 500
setv va00 posl
setv va01 post
* Create a flower (attr: invisible 16)
new: simp 2 7 36440 "ols_deserttree2" 1 1 rand 410 420
attr 16
bhvr 0
tick rand 800 1000
addv va00 rand 0 130
addv va01 rand 0 70
mvsf va00 va01
endm
* flower script: turn flower into seed
scrp 2 7 36440 9
setv va00 posx
setv va01 posb
* Create seed
new: simp 2 3 36440 "ols_deserttree2" 1 2 rand 400 600
attr 194
bhvr 48
tick 1200
perm 100
accg 1.2
elas 30
fric 60
aero 1.1
emit 7 1
mvsf va00 va01
targ ownr
kill ownr
endm
* Seed timer and eat script
scrp 2 3 36440 9
kill ownr
endm
scrp 2 3 36440 12
stim writ from 77 1.2
kill ownr
endm
**
** Removal script
**
*rscr
*enum 2 3 36440 kill targ next
*enum 2 4 36440 kill targ next
*enum 2 7 36440 kill targ next
*scrx 2 3 36440 9
*scrx 2 3 36440 12
*scrx 2 4 36440 1
*scrx 2 4 36440 9
*scrx 2 7 36440 9