Author Topic: Scaler error  (Read 2623 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

Scaler error
« on: November 11, 2017, 10:16:51 AM »
I'm having a problem using the scaler.  When I call it with a view that has an instance explicitly declared in room (Egg) it works just fine, but when I call it on a view I create 'on-the-fly', the scaler throws an error of "<View setScale:> y value less than vanishingY".  My best guess is that I'm improperly creating the on-the-fly view, but I don't know how else to do it.

Code: [Select]
(method (init)
     (super init:)

     (Egg         view:24 loop:4 cel:0 x:100 y:100 init: setScale: Scaler 50 50)
     ((View new:) view:24 loop:4 cel:0 x:100 y:150 init: setScale: Scaler 50 50)
)
...

(instance Egg of Prop)

EDIT: Deferring the scaling doesn't seem to make a difference either.  The 'egg' instance works just fine, the dummy fails in the same way as the code above.
Code: [Select]
        (Egg view:24 loop:4 cel:0 x:100 y:100 init: )
        (Egg setScale: Scaler 50 50)
       
        (= dummy ((View new:) view:24 loop:4 cel:0 x:100 y:150 init:))
        (dummy setScale: Scaler 50 50)

EDIT2: I figured it out.  Shouldn't be using the 'View' class, should be using the 'Prop' class.  Once I changed the code to new-up a Prop it worked fine, which made perfect sense once I discovered the scaler property associated to Prop.  :-[
« Last Edit: November 11, 2017, 10:40:14 AM by gumby »


In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline gumby

Re: Scaler error
« Reply #1 on: January 01, 2021, 05:47:42 PM »
Old thread, but I finally fixed my game when running in ScummVM.

This is wrong:
Code: [Select]
   (dummy setScale: Scaler 50 50)

You must provide all 4 parameters to the Scaler call:
Code: [Select]
   (dummy setScale: Scaler 50 50 190 0)
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.032 seconds with 23 queries.