This statement stores a reference to the eighth model of the cast member named 3DWorld in the
variable thismodel.
thismodel = member("3DWorld").model[8]
This statement shows that there are four models in the member of sprite 1.
put sprite(1).member.model.count
-- 4
modelA
Usage
collisionData.modelA
Description
3D
collisionData
being
.
modelB
The
collisionData
events to the handler specified in the
setCollisionCallback
The
#collideWith
which collision modifiers have been added. The
be set to
TRUE.
This property can be tested but not set.
Example
This example has three parts. The first part is the first line of code, which registers the
handler for the
#putDetails
When two models in the cast member named MyScene collide, the
called and the
collisionData
properties of the
modelB
example shows the results from the message window. These show that the model named
GreenBall was
modelA
member("MyScene").registerForEvent(#collideAny, #putDetails, 0)
on putDetails me, collisionData
put collisionData.modelA
put collisionData.modelB
end
-- model("GreenBall")
-- model("YellowBall")
See also
registerScript(), registerForEvent(), sendEvent, modelB,
setCollisionCallback()
862
Chapter 14: Properties
property; indicates one of the models involved in a collision, the other model
object is sent as an argument with the
registerForEvent, registerScript
commands.
and
events are sent when a collision occurs between models to
#collideAny
#collideAny
argument is sent to it. This handler displays the
object in the message window. The third part of the
collisionData
and the model named YellowBall was
#collideWith
property of the models' modifiers must
resolve
event. The second part is the
modelB
and
#collideAny
, and
handler.
#putDetails
handler is
#putDetails
and
modelA
in the collision.
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers