Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Frame object testing
- /*function PrintFrameTime(frametime)
- {
- print(frametime);
- }
- frame.Updated.connect(PrintFrameTime);
- ///@todo Test delayed signal stuff.
- */
- // Entity Action testing
- /*
- function PrintMove(direction)
- {
- print("Move " + direction);
- }
- print("js jauuuuu");
- me.Action("Move").Triggered.connect(PrintMove);
- for (var i = 0; i < 5; ++i)
- {
- me.Exec("Move", "Forward");
- }
- */
- // Console testing
- /*
- function CommandTest(params)
- {
- print("CommandTest" + params);
- print(params.length());
- for (var i = 0; i < params.length(); ++i)
- {
- print("param[" + i + "]" + params[i]);
- }
- }
- console.Print("Fuuuuuuu");
- console.ExecuteCommand("test(123, 456, 789");
- console.RegisterCommand("jstestcmd", "Testing console command stuff from js").Invoked.connect(CommandTest);
- */
- // EC_Sound & EC_SoundListener testing
- /*
- function OnComponentAdded(entity, component, type)
- {
- if (component.TypeName == "EC_Sound")
- {
- print("EC_Sound added:");
- print(component.soundId);
- print(component.soundInnerRadius);
- print(component.soundOuterRadius);
- print(component.soundGain);
- print(component.loopSound);
- print(component.triggerSound);
- }
- if (component.TypeName == "EC_SoundListener")
- {
- print("EC_SoundListener added:");
- print(component.active);
- }
- }
- function OnEntityCreated(entity, change)
- {
- print("Entity created");
- }
- function OnInputMapAction()
- {
- me.Exec("PlaySound");
- }
- scene.ComponentAdded.connect(OnComponentAdded);
- scene.EntityCreated.connect(OnEntityCreated);
- me.Action("Move").Triggered.connect(OnInputMapAction);
- */
- print("testing123");
- var execType = 1;
- function ExecTest()
- {
- print("Executing \"test\" " + execType);
- me.Exec("Test", execType);
- if (execType == 1)
- execType = 2;
- else if (execType == 2)
- execType = 4;
- else if (execType == 4)
- execType = 1;
- // frame.DelayedExecute(1.0).Triggered.connect(delayedExec);
- }
- //frame.DelayedExecute(1.0).Triggered.connect(delayedExec);
- me.Action("Move").Triggered.connect(ExecTest);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement