Prop (of View
)¶
-
class
Prop
¶ Defined in Actor.sc.
Prop extends
View
by providing the following additional abilities:- cycling through animation frames
- attach Scripts
- attach a Scaler
Example definition:
(instance monitor of Prop (properties x 13 y 161 noun N_MONITOR view 1142 loop 1 priority 15 signal fixPriOn cycleSpeed 14 ) )
Example initialization:
(monitor: init: setCycle: Forward setScript: sPlayMC )
Subclasses: Narrator
, Actor
, Door
.
Properties¶
Inherited from View
:
Property | Description |
---|---|
x | x position. See posn(). |
y | y position. See posn(). |
z | z position. See posn(). |
heading | The angle direction the Prop faces. |
noun | The noun for the Prop (for messages). |
case | The optional case for the Prop (for messages). |
modNum | Module number (for messages) |
nsTop | “Now seen” rect. The visual bounds of the Prop. |
nsLeft | |
nsBottom | |
nsRight | |
sightAngle | |
actions | |
onMeCheck | The type of onMe checks that are done. |
state | |
approachX | The approach spot x. |
approachY | The approach spot y. |
approachDist | The approach distance. |
_approachVerbs | Bitmask indicating which verbs cause the ego to approach. |
yStep | |
view | The view for Prop. |
loop | Loop for the Prop. |
cel | Current cel of the Prop. |
priority | Priority screen value of the Prop. |
underBits | |
signal | |
lsTop | The “last seen” rect... |
lsLeft | |
lsBottom | |
lsRight | |
brTop | The “base rect”, used for collison detection. |
brLeft | |
brBottom | |
brRight | |
scaleSignal | |
scaleX | Current x scale. |
scaleY | Current y scale. |
maxScale | Max scale. |
name |
Defined in Prop:
Property | Description |
---|---|
cycleSpeed | How quickly the Prop animation cycles. |
script | Arbitrary Script object. |
cycler | Cycle attached to the Prop. |
timer | |
detailLevel | |
scaler | Scaler object attached to the Prop. |
Methods¶
-
doit
()
-
handleEvent
(pEvent) Lets the Prop’s script have a chance at handling the event.
-
delete
()
-
motionCue
()
-
checkDetail
(param1)
-
setScale
(class params)
-
setScale
(obj params)
-
setScale
(-1 otherObj)
-
setScale
(scale) Provides various ways to control the scaling of a Prop. See
Scaler
andScaleTo
.Example usage for attaching a dynamic scaler:
(gEgo setScale: Scaler frontSize backSize frontY backY)
Example usage for setting an explicit scale:
(gEgo setScale: 50) ; 50 percent size.
Parameters: - class (class) – A scaler class, such as Scaler.
- obj (heapPtr) – An instance of a scaler class.
- params – Initialization parameters for the scaler.
- otherObj (heapPtr) – Another object from which to copy scaling information.
- scale (number) – A percentage scale.
-
setCycle
(theCycler sendParams) Sets a cycler object on the Prop, optionally supplying initialization parameters for the cycler.
Example usage for telling a Prop to cycle forward:
(theFrog setCycle: Forward)
Example usage for telling a Prop to cycle to the end, then cue its caller:
(theFrog setCycle: EndLoop self)
Parameters: theCycler (class) – A class derived from Cycle
, or NULL to remove the current cycler.
-
setScript
(theScript sendParams) Attaches an arbitrary script to the Prop, optionally providing initialization parameters.
Example usage:
(self setScript: theRoomScript)
-
cue
()