-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path36465_signpost.cos
144 lines (134 loc) · 2.18 KB
/
36465_signpost.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
doif game "betaship" ne 1
**
** Signpost install script
**
new: simp 1 3 36465 "betaship_fav" 1 0 1
attr 272
mvto 54223 27172
tick 10
**
** Controller/overlay install script
**
new: simp 1 1 36465 "betaship_fav" 21 1 10000
* attribute: activateable 4 + floatable 32 = 36
attr 36
* ov00: the favplace variable
* ov01: the metaroom id
* ov02: the time of day
* ov03: the season
* ov04: the favplace fltx
* ov05: the favplace flty
* ov06: current pose
frel null
seta ov00 targ
setv ov01 gmap 54223 27172
setv ov02 99
setv ov03 99
setv ov04 0
setv ov05 0
setv ov06 0
* initial tick
tick 10
** Set betaship game variable
setv game "betaship" 1
endi
**
** controller push script
**
scrp 1 1 36465 1
* if signpost is on screen
doif ov00 ne ownr
* send push message to signpost
mesg writ ov00 0
endi
endm
**
** controller timer script
**
scrp 1 1 36465 9
* If the signpost variable isn't set yet
doif ov00 eq ownr
show 0
* Check for signpost
rtar 1 4 36465
* If there is a signpost
doif targ ne ownr and targ ne null
doif velx eq 0 and vely eq 0
* Set the signpost variable
seta va00 targ
show 0
targ ownr
seta ov00 va00
endi
endi
* if the signpost variable is set
else
* retarget ownr
targ ownr
tick 20
show 1
inst
* recalculate posx posy
setv va00 ov02
setv va01 ov03
setv va99 0
targ ov00
doif va00 ne fltx
setv va00 fltx
setv va99 1
endi
doif va01 ne flty
setv va01 flty
setv va99 1
endi
doif va99 eq 1
targ ownr
flto va00 va01
endi
slow
targ ownr
* if the time pose isn't correct
doif ov02 ne time
* set the timevar
setv ov02 time
* if the season pose isn't correct
doif ov03 ne sean
* set the seasonvar
setv ov03 sean
endi
* calculate the pose from the season vars
setv va00 ov02
setv va01 ov03
setv va10 va01
mulv va10 5
addv va10 va00
addv va10 1
* change the pose variable
setv ov06 va10
endi
doif meta eq ov01
pose ov06
else
pose 0
endi
endi
endm
* metaroom change event
scrp 1 1 36465 900
doif meta eq ov01
pose ov06
else
pose 0
endi
endm
rscr
enum 1 3 36465
kill targ
next
enum 1 4 36465
kill targ
next
enum 1 1 36465
kill targ
next
setv game "betaship" 0