question about saving and loading

For questions about using Classic.

Post » Thu Jan 08, 2009 8:12 am

i made a level editor and i can save and load files (levels)
but it saves the file WITHOUT the extension i want
so when i want to load the saved file it doesn't recognize the file:(
so i can only open it with "all files" and not the extension i made

i used this
"Save File|*.save|All Files|*.*||"

its the same format as the example in the info bar at the top of the window

i hope someone can help me:)
B
3
G
4
Posts: 34
Reputation: 1,143

Post » Fri Jan 09, 2009 7:52 am

i realy need this help becaus my school project depends on it(almost:P)

ohh and i have one other simple question...
how can you let the screen scroll with the mouse and not with a object??

hope someone can help me:D
B
3
G
4
Posts: 34
Reputation: 1,143

Post » Fri Jan 09, 2009 8:11 am

Sorry I don't know the answer to the first question, but I can help with the second.

Make a sprite that is invisible on start. Make an event that always sets this sprite's position at mousex, mousey. Then give the sprite the "center view on me" attribute.

This is one way of doing this and it may not be the effect you wanted, but I'm sure there is another way.
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Fri Jan 09, 2009 9:00 am

[quote="Chezzy":177pdtvj]Make a sprite that is invisible on start. Make an event that always sets this sprite's position at mousex, mousey. Then give the sprite the "center view on me" attribute.[/quote:177pdtvj]

That'll give you funky results.

Here, I made a quick example of simple mouse scrolling. It's not timedelta'd and it uses a sprite object instead of pure math, but it's the easiest way I could think to do it:

http://willhostforfood.com/files3/74640 ... olling.cap

It only scrolls when the mouse is in the window, and the further away the mouse is from the center, the faster the screen scrolls.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Jan 09, 2009 9:50 am

thank you deadeye and chezzy
chezzy's idea works only a little to FAST:P
deadeye's demo was very usefull but you cant realy stop it if you wand to place a object( i am building a level editor) its always scrolling:P
im now trying to combine the 2 but help is alway's welcome:D

and if someone knows my save/load problem please help me:)

thanks again
B
3
G
4
Posts: 34
Reputation: 1,143

Post » Fri Jan 09, 2009 10:18 am

[quote="spearfire":29ruhy1t]deadeye's demo was very usefull but you cant realy stop it if you wand to place a object( i am building a level editor) its always scrolling:P[/quote:29ruhy1t]

So add some kind of other control to it, like a mouse button you hold to scroll or something. It's just one more condition to add.

Not sure about the save/load thing though, I've never used that feature. Hopefully someone can help you with that.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Jan 09, 2009 2:25 pm

How does the saving work? Ive actually built a level editor complete with camera, and zooming so any questions I could more than likely handle. If you post your cap I could give you a better idea on how to do it.
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Sat Jan 10, 2009 11:15 pm

ok here is the cap file
dont look at the graphics they are still in the making:P:P
look at the event editor for all the controls

[url:2jot7tbs]http://www.megaupload.com/nl/?d=9118GXRQ[/url:2jot7tbs]
B
3
G
4
Posts: 34
Reputation: 1,143

Post » Wed Jan 14, 2009 8:43 am

well i came across a other problem and i thought i can put it in here as well so i dont have to create a new topic:)
when i try to load a image into the canvas my application crashes

here is a screenshot of what i did


please help me with this(and my other problem:P:P)
B
3
G
4
Posts: 34
Reputation: 1,143

Post » Wed Jan 14, 2009 2:47 pm

[quote="spearfire":2t44ze6y]
when i try to load a image into the canvas my application crashes
[/quote:2t44ze6y]

When you say "crashes" do you mean that the [u:2t44ze6y]System: Close Application[/u:2t44ze6y] action runs?
B
3
S
2
G
4
Posts: 271
Reputation: 2,017

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests