Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by matthew

I have an entity with a default setting (settings.gravitate) as true. Some times I want this as false, so I change it in Weltmeister.

In the entity's class, it shows a false (using Chrome developer tools), however when it is passed to the parent class it is now a string "false". I have worked around it like this: var myval = (!settings.gravitate || settings.gravitate != "false");

1 decade ago by dominic

Thanks. I will change it the next version, so that the strings "true" and "false" is automatically translated into the bool true and false.

For now, you could also just set this value to 0 - it will behave in the same way as a bool.
Page 1 of 1
« first « previous next › last »