Kinda advanced question... Makslane help :D

Non-platform specific questions.

Kinda advanced question... Makslane help :D

Postby Hblade » Sat Oct 24, 2009 1:40 pm

Everyone. You've heard of my CTW, (Custom window creation) system, now I think it's time I enhance it... I need to know how to "cut" so to say numbers so that it would match the closest thing possible. Heres what I mean...

The tiles are 32 x 32, so you can have a width of 480 using the tiles because 480 can be divided into 32... but if you went... say 481, or anything different, how would you make it round to the nearest division by 32?

In other words, I need a script that would actually take a round to the nearest division of 32.. So if you have a width of 484, it would be rounded to 480, because 484 dosnt divide into 32. And if you have 637, it'll automaticlly divide into 640, because it's the closest division by 32...

Hehe, I can really enhance the CTW System this way... For example you wouldnt need canvas actors anymore... You can make windows specially from the view! :D Like this:
Code: Select all
NewWindow(388, 200, x, y, style);

Where style is the windows style that you can customly apply and name in the global code. I'll also have these features available if I can get some help with this :D
Code: Select all
ResizeWindow(width, height, x, y);
ChangeWindow(style);

Where resizing the window will resize the window! :D (It's going to be hard and I might need y9our guys' help with that too.).
And of course, ChangeWindow will change the style of the window O.o (Which... I'm going to need help on again >.>) Anyone who wants to help will be thanked :D And credits too :D

Oh, and if you want to make a text actor stick to the box, it's easy! :D Just have the text actor's X and Y to be equal to the top right corner of the window. Or we could do this.
Simply make an off screen text actor that dosnt start up at game... Then in the code
Code: Select all
NewWindow(width, height, x, y, style, textactor);

Where text actor would create a text actor if it was 1(true), and it will do nothing if it was 0(false).

Thanks in advanced :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Kinda advanced question... Makslane help :D

Postby makslane » Sat Oct 24, 2009 2:06 pm

Humm, you can't resize a game window
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Kinda advanced question... Makslane help :D

Postby Hblade » Sat Oct 24, 2009 2:07 pm

Thats not what I mean, the windows your resizing are created via-actors, and multiple tiles using the script :O
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Kinda advanced question... Makslane help :D

Postby skydereign » Sat Oct 24, 2009 5:21 pm

Well, the rounding part can be done by this.
Code: Select all
round(variable/32)*32;
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron