Outerra forum

Anteworld - Outerra Game => Tech demo, support, updates => Topic started by: deathevor on May 18, 2013, 07:03:51 pm

Title: console.log("your message here"); ?
Post by: deathevor 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
Title: Re: console.log("your message here"); ?
Post by: deathevor 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');
Title: Re: console.log("your message here"); ?
Post by: ddenn 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
Title: Re: console.log("your message here"); ?
Post by: deathevor 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.