From MMF2 to Construct / A few questions

For questions about using Classic.

Post » Sun Jun 06, 2010 1:46 pm

Hey there!

I've been a user of Clickteam products for a loooong time, but I'm thinking of switching over to Construct (I hear this is common trend for MMF users). It seems to be very similar to MMF2, dare I say a spin-off, but much, much nicer :D

Anyway, the transition is going pretty smooth so far but I've got a few questions.

[color=#0040FF:222gmdgm]1)[/color:222gmdgm] Resizing the window. I used this code to adjust my window size in MMF:

[color=#FF0000:222gmdgm][size=85:222gmdgm]-Set width of app window to WinXSize( "Window Control" )-ClientWidth( "Window Control" )+Frame Width*n
-Set height of app window to WinYSize( "Window Control" )-ClientHeight( "Window Control" )+Frame Height*n[/size:222gmdgm][/color:222gmdgm]

Works great in MMF, but is totally inaccurate in Construct. The window ends up very tall and slim. Also, I'm not sure how to position the window in the exact center of the screen after a resize. In MMF you can simply select top left, bottom right, center, etc.


[color=#0040FF:222gmdgm]2) [/color:222gmdgm]Fullscreen. My window size is 256x224, but Construct prevents fullscreen mode with such a small window size. Why is this? How do I get around this? In MMF you can have a window of literally any size and you can still go fullscreen.


[color=#0040FF:222gmdgm]3)[/color:222gmdgm]Animation Directions. In MMF you get 32 directions per active object. This is great for having a player that can aim in multiple directions or have different "modes" while not losing the current frame value. An example would be "Direction is 0 - Player is facing right and NOT holding weapon" "Direction is 1 - Player is facing right and IS holding a weapon". How would I do this in Construct? Sub-animations?

There were a few other things I wanted to ask about but can't think of at the moment XD; This should do for now. Thanks for any help!
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Sun Jun 06, 2010 11:06 pm

1)
Resize window
Objects needed: Window
[code:dgxwbn3d]-> Window: Set size to (320+Window.Width-DisplayWidth, 240+Window.Height-DisplayHeight)[/code:dgxwbn3d]
replace 320 and 240 to whatever size you want.

If the Window properties option "Caption" is unchecked then you can simplify it to:
code]-> Window: Set size to (320, 240)[/code]

Center window
Objects needed: Window, SysInfo
-[code:dgxwbn3d]> Window: Set position to ((SysInfo.GetScreenWidth - Window.Width)/2, (SysInfo.GetScreenHeight - Window.Height)/2)[/code:dgxwbn3d]


2)
Alternative Fullscreen
Objects needed: Window
Do this: uncheck the window properties option "Caption"
and use this event:
[code:dgxwbn3d]+ System: Start of layout
-> Window: Maximize window
[/code:dgxwbn3d]

3)
Construct is not limited to 32 directions, you can have as many directions as you like.
Click on a sprite and goto the animation tab.
By default there is only 1 angle: "Angle: 0 (Right)"
right click on that angle and select "Add new angle"
You can select an angle from the dropdown or just type in whatever angle you want (repeat for as many angles as you need).
For 32 direction that would be an angle every 11.25 degrees.
At runtime the sprite will automatically lock to the closest animation angle.
B
79
S
24
G
55
Posts: 4,755
Reputation: 41,273


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests