-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path36463_fruit_pp.cos
114 lines (100 loc) · 2.02 KB
/
36463_fruit_pp.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
102
103
104
105
106
107
108
109
110
111
112
113
114
** CAOS2PRAY
*# Pray-File "gb_pp_betafruit.agent"
*# DSGB-Name "Betaship Fruit PP"
*# Depend blnk.c16
*# Attach betaship_agents.c16 betaship.catalogue
*# Attach betaship_dead.c16
*# desc = "A fruit patch from the Betaship"
*# Agent Animation File = "betaship_agents.c16"
*# Agent Animation Gallery = "betaship_agents"
*# Agent Sprite First Image = 1
*# GB_Category = 1
*# Agent Author = "Pilla"
*# link 36463_dead.cos 36463_deadremover.cos
**
** Fruit script
**
** Gardenbox invisible flag holding name variables
new: simp 1 205 36463 "blnk" 0 0 9000
* Spawn script
setv name "spawn_script" 1009
sets name "sprite_file" "betaship_agents"
setv name "sprite_pose" 1
setv name "prod_fmly" 2
setv name "prod_gnus" 8
setv name "prod_spcs" 36463
setv name "density" 1
setv name "tickfrom" 200
setv name "tickto" 260
** Contact patch core agent
seta va00 targ
enum 1 1 22929
mesg wrt+ targ 1000 va00 0 0
next
**
** Creation script
**
** Fruit creation
scrp 1 205 36463 1009
new: simp name "prod_fmly" name "prod_gnus" name "prod_spcs" name "sprite_file" 1 name "sprite_pose" name "patch_plane"
* Attr: mouseable 2 + collide 64 + physics 128 = 194
attr 194
* Bhvr: eat 16 + pick up 32
bhvr 48
* Set physics attributes
accg 0
aero 3
* Set collision attributes
perm 60
fric 60
elas 30
* Move to the spot if possible
mvto _p1_ _p2_
setv name "patch_id" mame "patch_id"
tick rand mame "tickfrom" mame "tickto"
endm
**
** Eat script
**
** Fruit eat
scrp 2 8 36463 12
stim writ from 78 2
kill ownr
endm
**
** Timer script
**
** Fruit
scrp 2 8 36463 9
* If around for long enough, kill it
doif carr eq null
addv ov00 1
endi
doif ov00 gt rand 6 8
* Emit fruit smell
emit 6 0.3
* Set gravity
accg 2
* Decouple from patch
setv name "patch_id" 0
doif carr eq null
doif ov00 gt 13
gsub manky
endi
endi
endi
subr manky
slow
targ ownr
setv va00 posl
setv va01 post
new: simp 2 9 36463 "betaship_dead" 1 0 rand 1000 3000
mesg wrt+ targ 1000 va00 va01 0
targ ownr
attr 16
show 0
wait 20
kill ownr
stop
retn
endm