Author Topic: BlockOS [On hold until further notice]  (Read 82205 times)

You also had a syntax error: mRound((%xpos * 66) / 66);


You also had a syntax error: mRound((%xpos * 66) / 66);
He wasn't posting code, though.

Something more than a user would be using, which was falsely claimed by Ephialtes.
So then I would have nothing to worry about. And him falsely claiming something that serious doesn't sound like him, but that's off topic.
What, I think you got my post wrong.
He said "%xpos doesn't change" I mean COME ON. Have you never made a mod that snaps a brick to like a 4x cube grid?
x = mFloatLength((x * 2) / 2,0);
dude, it's mFloor(x\2)*2
I think you may need me to help with the math used in this mod..

So then I would have nothing to worry about. And him falsely claiming something that serious doesn't sound like him, but that's off topic.dude, it's mFloor(x\2)*2
I think you may need me to help with the math used in this mod..
Not in my first MC Mod.

Not in my first MC Mod.
Try the two formulas for yourself, try them both with an input of 3.
mRound(%x/2)*2 should output 2, (btw if you need the code for mRound just ask me)
and yours should output 3.

« Last Edit: April 30, 2012, 05:50:10 AM by Port »

do NOT use GUI files

NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO
The mods use GUI files


Code: [Select]
git pull <repo>Hurr durr, I'm a beta tester too

EDIT:
Code: [Select]
%xpos = mRound((%xpos * 66) / 66);
%ypos = mRound((%ypos * 66) / 66);

Correct me if I'm wrong, but (x * 66) / 66 = x
Brian, you fail at math.

First check what you just tried to copy :p


%x = mRound(%x / 66) * 66;
%y = mRound(%y / 66) * 66;


This is the code I made to snap the icons to a grid (66x66), mRound is defined elsewhere in BOS7.

Still think it's stupid? let me explain...
To get the icons to snap to a 66 grid, we have to round the position divided by 66 (otherwise it would snap to the nearest pixel - kinda pointless), we then have to multiply by 66 to get the proper grid position, otherwise everything would be crammed into a corner.

Next time, try reading the whole code first.

EDIT:
Note that the code is on a public repo for a reason, you can try it if you want, however it will probably break things (it's missing most of the functionality of the main menu)
« Last Edit: April 30, 2012, 11:24:20 AM by Fluff-is-back »

I stoppedpushing to the repo


Err mind being a little less vague on how to make apps?