Park Files, Old to New…

There are a few changes to the way things happen in the creator, today I'm going to go over the changes to keyframe events, sounds, plug-in and cameras. I will show you how it was done in the old Creator and then show you how to do the same thing in the new Creator.

Keyframe Events.
Keyframe events are a great way to move items along a path as they will make rounded corners instead of having very hard sharp corners.
This is an example of an old keyframe Events copied out of IMML:

  1. <Script Name="Box_Timeline">function main(obj, args)
  2. kfc = keyframecontroller()
  3. kfc.absolutekeyframes = true
  4. kfc:addtranslationkeyframe(1000, 0,1,0)
  5. kfc:addtranslationkeyframe(2000, 0,2,0)
  6. kfc:addtranslationkeyframe(3000, 0,3,0)
  7. kfc.entity = scene:getcontent('Box')
  8. kfc:play()
  9. end
  10. </Script>

As you can see it was part of a script.
This is an example of a new keyframe event copied out of IMML that does the same thing:

  1. <Timeline Name="Box_Timeline" Enabled="True" Speed="1">
  2. <KeyframeEvent Value="0,1,0" Target="Position"
  3. Time="00:00:01" Element="Box"/>
  4. <KeyframeEvent Value="0,2,0" Target="Position"
  5. Time="00:00:02" Element="Box"/>
  6. <KeyframeEvent Value="0,3,0" Target="Rotation"
  7. Time="00:00:03" Element="Box"/>
  8. </Timeline>

Now keyframe Events are kept inside timelines. This new way of putting keyframes into the parks is much quicker and easier because the auto fill and error reports will tell you if you make a mistake.

Sounds.
Sounds have also changed making them more like other elements in VastPark.
Old sounds in IMML look like this:

  1. <Sound Loop="True" Name="boom" Source="" Position="0,1,8"/>

The new sounds look like this in IMML:
  1. <Sound Name="boom" Enabled="False" Source="" Position="0,1,8"/>

The main differences are the amount of ways that you can change how the sound acts in the scene. Sounds can no longer be played with this script "scene:getcontent('Sound_name'):play()", now they act like other items in the scene and work with "scene:getelement('Sound_name').enabled ="true"."

CharacterPlugin.
Something new in this release is plug-ins, this is a great way to easily add working scripts into your scene. This is great when you want to easily have an avatar running around, instead of writing in all this:

  1. <Script Name="Avatar Controller">function main(obj, args)
  2. a = avatarcontroller()
  3. a.JumpImpulse = 75
  4. a.RunMultiplier = 03
  5. a.WalkSpeed = 7.5
  6. a.entity = scene:getcontent('Ted')
  7. a.enabled = true;
  8. end
  9. </Script>

You just download the CharacterPlugin and add the avatar you want to it:
  1. <Plugin Name="CharacterPlugin" Source="" Enabled="True">
  2. <Element Name="Ted" />
  3. <Parameter Key="Avatar" Value="Ted" />
  4. </Plugin>

This is much easier than the old way and means that other people could make a really good controller and all your going to need to do is add in the name of the item you want to control. There are also many other values that you can control with the plug-in.

Cameras.
You're still going to need a camera to chase it. In the old park you would add a script like this to the Avatar Controller script:

  1. cc = chasecontroller(scene:getcontent('Ted'))
  2. cc.MinimumChaseDistance = 10
  3. cc.MaximumChaseDistance=25
  4. cc.lookatoffset = vector3(0,0, 0)
  5. cc.entity = scene.usercamera
  6. cc.enabled = true

In the new creator you will use the camera itself to chase an object; whether it is an avatar or another object. This is done on the camera in IMML and is really easy and very useful:
  1. <Camera Name="Camera" Enabled="True" ChaseTarget="Ted"
  2. ChasePositionOffset="0,3,-4" ChaseDamping="60" ChaseStiffness="100"/>

The only thing that really needs to be added to the camera is the ChaseTarget="Ted" because the camera has all the other values set as its default.

Well that's about it, hopefully with this you'll be able to have your old parks up and running soon. If you're having any troubles throw it up on the forums, we'll be able to help you through it and with any luck we'll solve some other people troubles.
- Drew

ps: if you're copying from this blog remember to have each IMML tag on one line.
Posted by Drew on 11/02 at 08:21 PM in Creative Users • (0) Comments

Comments

Name:

Email:

URL:

Comments:

Remember my personal information

Notify me of follow-up comments?

Enter this word:


Here: