Changes between Initial Version and Version 1 of Ticket #13114, comment 6


Ignore:
Timestamp:
Dec 9, 2021, 10:42:20 AM (2 years ago)
Author:
Thpwg

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13114, comment 6

    initial v1  
    1 COURSE ALREADY ACHIEVED bug.
    2 That is a separate bug from the vocab issues.
     1COURSE ALREADY ACHIEVED bug. That is a separate bug from the vocab issues.
    32We can fix the bug by changing just a few lines of code :
    43
    5 Open script.019 and edit (global2 newRoom: 17) to (= state 5) in courseScript (1
    6 
     4**In rm19.sc I modified state 1 in the couseScript changeState method:**
     5...
    76(if (== temp0 {COURSE ALREADY ACHIEVED})
    8         (scanBut state: 0)
     7        ;(scanBut state: 0)
     8        ;(global2 newRoom: 17)
     9        (scanBut state: 0 cel: 2 draw:)
     10        (courseBut state: 0 cel: 1 draw:)
     11        (returnBut state: 0 cel: 1 draw:)
    912        (= state 5)
    1013)
     14...
    1115
    12 We set it to (= state 5) because after 3 seconds it will change to script (6 instead of (2
    13 
    14 and add (6
     16**Then added a state 6:**
    1517
    1618(6
     
    1820)
    1921
    20 So courseScript should look like this after you edit it:
    21 
    22 (instance courseScript of Script
    23         (properties)
    24        
    25         (method (changeState newState &tmp temp0 [temp1 49])
    26                 (switch (= state newState)
    27                         (0
    28                                 (if local2 (localproc_003c local2) (= local2 0))
    29                                 (= global162 (/ global214 12))
    30                                 (if
    31                                 (> (= global161 (- global214 (* global162 12))) 0)
    32                                         (++ global162)
    33                                 else
    34                                         (= global161 12)
    35                                 )
    36                                 (if (> global163 global161) (= global165 1))
    37                                 (if (< global163 global161) (= global165 -1))
    38                                 (if (== global163 global161) (= global165 0))
    39                                 (if (> global164 global162) (= global166 1))
    40                                 (if (< global164 global162) (= global166 -1))
    41                                 (if (== global164 global162) (= global166 0))
    42                                 (= seconds 2)
    43                         )
    44                         (1
    45                                 (= temp0
    46                                         (if (== global213 global214)
    47                                                 {COURSE ALREADY ACHIEVED}
    48                                         else
    49                                                 {STANDBY\nCALCULATING COURSE}
    50                                         )
    51                                 )
    52                                 (if (!= global213 global214) (= global217 global213))
    53                                 (if local1 (localproc_003c local1) (= local1 0))
    54                                 (= local4
    55                                         (Display
    56                                                 temp0
    57                                                 dsWIDTH
    58                                                 135
    59                                                 dsALIGN
    60                                                 1
    61                                                 dsCOORD
    62                                                 168
    63                                                 3
    64                                                 dsCOLOR
    65                                                 14
    66                                                 dsFONT
    67                                                 600
    68                                                 dsSAVEPIXELS
    69                                         )
    70                                 )
    71                                 (if (== temp0 {COURSE ALREADY ACHIEVED})
    72                                         (scanBut state: 0)
    73                                         (= state 5)
    74                                 )
    75                                 (= seconds 3)
    76                                
    77                         )
    78                         (2
    79                                 (if local4 (localproc_003c local4) (= local4 0))
    80                                 (if (!= global213 global214) (= cycles 2))
    81                         )
    82                         (3
    83                                 (= local4
    84                                         (Display
    85                                                 {COURSE LOCKED}
    86                                                 dsWIDTH
    87                                                 135
    88                                                 dsALIGN
    89                                                 1
    90                                                 dsCOORD
    91                                                 168
    92                                                 3
    93                                                 dsCOLOR
    94                                                 9
    95                                                 dsFONT
    96                                                 600
    97                                                 dsSAVEPIXELS
    98                                         )
    99                                 )
    100                                 (= seconds 3)
    101                         )
    102                         (4
    103                                 (if local4 (localproc_003c local4) (= local4 0))
    104                                 (= cycles 1)
    105                         )
    106                         (5
    107                                 (localproc_003c
    108                                         (Format @local55 {DESTINATION : SECTOR %d} global217)
    109                                 )
    110                                 (= global220 local155)
    111                                 (global2 newRoom: 17)
    112                         )
    113                         (6
    114                                 (global2 newRoom: 17)
    115                         )
    116                 )
    117         )
    118 )
    119 
    120 
    121 That should make COURSE ALREADY ACHIEVED display for 3 seconds before changing to room17.
    122 
    12322**A very special thanks to doomlazer.**