I'm finding a little bug in that I cant have set a value in Weltmeister that begins with a 0. It's not a major error as I can work around it, but anyone know of an easy fix?
1 decade ago
by MikeL
Are you trying to set a value like
0.05
or
0sector
?
1 decade ago
by MikeL
Hareesun, I took a peak inside the Weltmeister code. Have a look at edit-entities.js under function
setEntitySetting
. The value that you set is checked with
parseFloat(value)
. You can
experiment with the javascript function here. See the
reference info here.
It looks like if you use a value like
0.05
, then your value becomes a float. But, if you do somethink like
0sector
, your value also becomes a float with a value = 0. It appears that
parseFloat
looks at the first character and if it is a number, then turns whatever numbers are available into a float. You could of course hack around this if you want to mess with edit-entities.js? :)
Hey Mike, I've just gone through my code and changed everything that once needed a leading 0 to not. A lot easier than messing with a file I'd like to update in the future :P I was trying to set things like 0900 and 0756, full floats.
Thanks for the great answer though :)
1 decade ago
by MikeL
Yeah, at one time I was trying to pass in some values like "ig.Entity.FLYING" or something along that line and realized that this would turn into a string. So I've been wanting to dig into that corner of the Welt to see how it ticks.
Of course, 0900, I should have thought of that. I was thinking why would one possibly start a non-number value with 0? Good stuff. Looking forward to seeing your game. :)
Ha, me too. So far I have 6 prototypes to get to grips with everything. Current WIP is really coming along though, will be sure to post it up here when it's further along. :)
Page 1 of 1
« first
« previous
next ›
last »