Skip to content

Commit

Permalink
Fixes stimuli on doors
Browse files Browse the repository at this point in the history
Sets doors to stim 75 (wait) on activation and stim 95 (traveled through meta door) on move.
  • Loading branch information
JGantts committed Oct 11, 2017
1 parent cb4ab32 commit a7c7e16
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 47 deletions.
36 changes: 23 additions & 13 deletions dev/Catallipac/CAT-door-events.cos
Expand Up @@ -27,8 +27,12 @@ scrp 2 2 24403 1
setv va01 1
endi
doif va01 = 0
* disappoint
stim writ from 0 1
stop
else
* wait
stim writ from 75 1
endi
** open
* self
Expand Down Expand Up @@ -61,18 +65,19 @@ scrp 2 2 24403 1
doif targ <> null
doif dead = 0 and aslp = 0
mvsf va02 va03
stim writ targ 95 1
endi

endi
next
else
targ from
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
stim writ targ 75 1
inst
doif targ <> null
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
endi
endi
slow
targ ownr
endi
** close
Expand Down Expand Up @@ -132,8 +137,12 @@ scrp 2 2 24404 1
setv va01 1
endi
doif va01 = 0
* disappoint
stim writ from 0 1
stop
else
* wait
stim writ from 75 1
endi
* turn off buttons
part 1
Expand Down Expand Up @@ -163,18 +172,19 @@ scrp 2 2 24404 1
doif targ <> null
doif dead = 0 and aslp = 0
mvsf va02 va03
stim writ targ 95 1
endi

endi
next
else
targ from
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
stim writ targ 75 1
inst
doif targ <> null
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
endi
endi
slow
endi
targ ownr
** close
Expand Down Expand Up @@ -292,4 +302,4 @@ endm
*next
*enum 2 2 24404
* kill targ
*next
*next
36 changes: 25 additions & 11 deletions dev/Daedalus/DAE-door-events.cos
Expand Up @@ -11,11 +11,11 @@ scrp 2 2 24405 1
setv va01 0
* if norn check if allowed
doif va00 = 1 and avar ownr ov00 = 1
* allow
* allow
setv va01 1
* if grendel check if allowed
elif va00 = 2 and avar ownr ov01 = 1
* allow
* allow
setv va01 1
* if ettin check if allowed
elif va00 = 3 and avar ownr ov02 = 1
Expand All @@ -26,8 +26,12 @@ scrp 2 2 24405 1
setv va01 1
endi
doif va01 = 0
* disappoint
stim writ from 0 1
stop
else
* wait
stim writ from 75 1
endi
** open
* self
Expand All @@ -48,17 +52,19 @@ scrp 2 2 24405 1
doif targ <> null
doif dead = 0 and aslp = 0
mvsf va02 va03
stim writ targ 95 1
endi
endi
next
else
targ from
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
stim writ targ 75 1
inst
doif targ <> null
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
endi
endi
slow
targ ownr
endi
** close
Expand Down Expand Up @@ -95,8 +101,12 @@ scrp 2 2 24406 1
setv va01 1
endi
doif va01 = 0
* disappoint
stim writ from 0 1
stop
else
* wait
stim writ from 75 1
endi
** open
* self
Expand All @@ -122,10 +132,14 @@ scrp 2 2 24406 1
next
else
targ from
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
inst
doif targ <> null
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
endi
endi
slow
targ ownr
endi
** close
Expand Down Expand Up @@ -218,4 +232,4 @@ endm
*next
*enum 2 2 24406
* kill targ
*next
*next
37 changes: 25 additions & 12 deletions dev/Morpheri/MOR-scripts-1.cos
Expand Up @@ -45,6 +45,11 @@
* UH activate
scrp 2 2 24407 1
lock
inst
doif from <> null
stim writ from 75 1
endi
slow
** open
* self
anim [1 2 3 4 5 6 7 8 9 10 11 12 13]
Expand All @@ -64,16 +69,17 @@ scrp 2 2 24407 1
doif targ <> null
doif dead = 0 and aslp = 0
mvsf va02 va03
stim writ targ 95 1
endi
endi
next
else
targ from
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
stim writ targ 75 1
inst
doif targ <> null
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
endi
endi
targ ownr
endi
Expand All @@ -88,6 +94,11 @@ endm
* DAE activate
scrp 2 2 24408 1
lock
inst
doif from <> null
stim writ from 75 1
endi
slow
** open
* self
anim [0 1 2 3]
Expand All @@ -107,17 +118,19 @@ scrp 2 2 24408 1
doif targ <> null
doif dead = 0 and aslp = 0
mvsf va02 va03
stim writ targ 95 1
endi
endi
next
else
targ from
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
stim writ targ 75 1
inst
doif targ <> null
doif aslp = 0 and dead = 0 and carr = null and aslp = 0
mvsf va02 va03
stim writ targ 95 1
endi
endi
slow
targ ownr
endi
** close
Expand All @@ -131,7 +144,7 @@ endm
* can't lock, sorry
scrp 2 2 24407 1000
rtar 1 2 10
mesg wrt+ targ 126 "Sorry, You can't lock this door" ownr 0
mesg wrt+ targ 126 "Sorry, you can't lock this door" ownr 0
endm


Expand All @@ -147,4 +160,4 @@ endm
* scrx 2 2 24407 va00
* scrx 2 2 24408 va00
* addv va00 1
*untl va00 > 10000
*untl va00 > 10000
29 changes: 18 additions & 11 deletions dev/Universal Hub/UH-MesoDoorScripts.cos
Expand Up @@ -4,7 +4,6 @@

*Constructor
scrp 2 2 24401 10
dbg: outs "constructor ds side door"
attr 4
clac 0
bhvr 1
Expand All @@ -14,11 +13,15 @@ scrp 2 2 24401 10
pat: dull 1 "CoCUHdoor" 9 52 8 0
part 1
pose 1
dbg: outs "end constructor ds side door"
endm

scrp 2 2 24401 1
lock
inst
doif from <> null
stim writ from 75 1
endi
slow
part 2
anim [0 1 2 3]
part 1
Expand All @@ -42,19 +45,20 @@ scrp 2 2 24401 1
doif dead = 0 and aslp = 0
doif tmvf va00 va01 = 1
mvsf va00 va01
stim writ targ 95 1
endi
endi

endi
next
else
targ from
doif tmvf va00 va01 = 1
stim writ targ 95 1
stim writ targ 75 1
mvsf va00 va01
inst
doif targ <> null
doif tmvf va00 va01 = 1
mvsf va00 va01
stim writ targ 95 1
endi
endi
slow
targ ownr
endi
part 2
Expand Down Expand Up @@ -85,6 +89,11 @@ endm

scrp 2 2 24402 1
lock
inst
doif from <> null
stim writ from 75 1
endi
slow
part 1
pose 0
part 0
Expand All @@ -108,7 +117,6 @@ scrp 2 2 24402 1
doif dead = 0 and aslp = 0
doif tmvf va00 va01 = 1
mvsf va00 va01
stim writ targ 95 1
endi
endi

Expand All @@ -119,7 +127,6 @@ scrp 2 2 24402 1
doif tmvf va00 va01 = 1
mvsf va00 va01
stim writ targ 95 1
stim writ targ 75 1
endi
targ ownr
endi
Expand All @@ -143,4 +150,4 @@ endm
*next
*enum 2 2 24402
* kill targ
*next
*next

0 comments on commit a7c7e16

Please sign in to comment.