Skip to content

huangyongda/vam-scripter

 
 

Repository files navigation

Virt-A-Mate Scripter Plugin

A scripting engine to write some code inside Virt-A-Mate without having to write a new plugin. The language is greatly inspired from JavaScript.

See the documentation for more information.

Example

import { scene, scripter } from "vam-scripter";

const surprisedSound = scene.getAudioClip("URL", "web", "surprised.wav");
const person = scene.getAtom("Person");
const personVoice = person.getStorable("HeadAudioSource").getAudioAction("PlayNow");
const head = person.getController("head");
const ball = scene.getAtom("Ball").getController("control");
const timeline = person.getStorable("plugin#0_VamTimeline.AtomPlugin");

scripter.onUpdate(() => {
  if (ball.distance(head) < 0.5) {
      personVoice.play(surprisedSound);
      timeline.invokeAction("Play Surprised");
  }
});

License

GNU GPLv3

About

A scripting language inside Virt-A-Mate, so you can write code within plugins!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 91.7%
  • JavaScript 8.0%
  • PowerShell 0.3%