Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: console.log("your message here"); ?  (Read 3125 times)

deathevor

  • Sr. Member
  • ****
  • Posts: 265
  • User
    • Sk-Films
console.log("your message here"); ?
« on: May 18, 2013, 07:03:51 pm »

Hi Cameni,

Does Outerra has a some kind of console.log call method to print out (check) some values or names?

Having trouble with

Code: [Select]
this.geom.rotate_joint_orig(altimiter, val * 0.001 * TWO_PI, {x:0,y:0,z:-1});Comes back with "Cannot call method 'rotate_joint_orig' of undefined."

Looks like
Code: [Select]
altimiter = geom.get_joint('AltitudePointer');doesn't see the bone or

Code: [Select]
geom = this.get_geomob(0); doesn't see the object

So  would be nice to check it via console message.

Thanks
Logged
VFx Artist/Supervisor, Private Pilot - www.sk-films.com

deathevor

  • Sr. Member
  • ****
  • Posts: 265
  • User
    • Sk-Films
Re: console.log("your message here"); ?
« Reply #1 on: May 18, 2013, 07:44:02 pm »

Solved the problem by deleting "this." from
Code: [Select]
this.geom.rotate_joint_orig(altimiter_id, 10, {x:0,y:0,z:-1});
So now it looks just

Code: [Select]
geom.rotate_joint_orig(altimiter_id, 10, {x:0,y:0,z:-1});(value 10 is just to avoid other errors temporarily)

Strange as all other scripts have it ("this.") and working fine



About console:

Found those log_dbg, log_err, log_inf - but somehow can't manage to make them work.
IS this one correct?

Code: [Select]
log_dbg ('My text');
« Last Edit: May 18, 2013, 11:45:04 pm by deathevor »
Logged
VFx Artist/Supervisor, Private Pilot - www.sk-films.com

ddenn

  • Sr. Member
  • ****
  • Posts: 374
Re: console.log("your message here"); ?
« Reply #2 on: May 19, 2013, 01:19:50 am »

This code works fine for me:

Code: [Select]
this.log_err(
    "test: " + (steering)
    );

I guess you have error because of undefined "val" value
Logged
i7 3930K 3.50 (3.80) Ghz, 32Gb RAM, GTX980 4 Gb VRAM, Windows 7 64-bit

About Outerra in Russian

deathevor

  • Sr. Member
  • ****
  • Posts: 265
  • User
    • Sk-Films
Re: console.log("your message here"); ?
« Reply #3 on: May 19, 2013, 08:24:16 am »

Thanks a lot Den,

The "val" was ok, as replacing it with number still was giving an error.

Logged
VFx Artist/Supervisor, Private Pilot - www.sk-films.com