|
Sex and Violence Behaviors.
Sex and Violence demonstrates the use of behaviors. The Sex and Violence scene contains
two different behaviors: Sex behavior and Violence behavior. The idea of Sex behavior is
when two models of the same type come close to each other they produce a baby. If Violence
behavior is attached to a model then it eats all the models of a different type that
approach it (growing correspondingly larger).
- Use Model->Get->Scene to load the scene SexAndViolence from $SI_LOCATION/3D/databases/SoftWishDemoDatabase. When
the scene has loaded you should see two spheres and one dodecahedron, all are path
animated. If you play the scene they will move, following their respective paths, but
nothing interesting happens.
- Use Model->Effects->behaviorEdit to
attach SI_LOCATION/3D/custom/SoftWish/SoftWishDemos/behaviorDemo/sexBehavior.tcl to sphere1, set its order to 0.1 and enable the
tcl code.
- Use Model->Effects->behaviorEdit to
attach SI_LOCATION/3D/custom/SoftWish/SoftWishDemos/behaviorDemo/monsterBehavior.tcl
to dodeco1 with an order of 0.2 and enable the tcl code.
- Select Model->Effect-> behaviorEvaluate.
There is no need to pick any models because behaviorEvaluate finds any code attached to
any element of the scene. For best results hide the behaviorEvaluate icon and maximize the
perspective window before playing the scene.
See Sex Tcl Script
|