How to save the game? and enemy paths?

For questions about using Classic.

Post » Sat May 17, 2008 6:28 pm

Ok I've been trying to figure out how to use the save game commands, and it hasn't been working:

I have a box, when the box is collided with the players bullet it will turn green (Got that working) and then save. I can't figure out how to use the save game commands to get it to work. It needs to work like this:

At the main menu I have a load button, it should load the progress of the current game.

Then there is a new game button, which should create a new game

I will assign a key to loading like R so when the player dies from spikes or such, he can see the particles of blood fall then load from where he saved with the box, or If the player gets stuck somewhere or wants to restart from the last save point.

When the box is shot with the bullet, it will save the game.
-------------------------------------------------------------------------------------------------------

Now I would like to know how I can tell my enemies where to go (This is a 2d platformer), say i wanted a enemy on the ground to move left and right back and forth, or just keep moving in one direction.

What i'm wondering is how do i make my enemies move around on platforms or ground, or even air if I decide to make a flying enemy. Do I need to make waypoints, If so How do I do it, or if I need to do something else.

--------------------------------------------------------------------------------------------------------

If anyone could help me with any of my questions i'd be grateful.

Thanks.
B
2
G
4
Posts: 34
Reputation: 1,118

Post » Mon May 19, 2008 12:22 am

for flying enemies you could use the RTS behavior to set waypoints
B
2
G
4
Posts: 35
Reputation: 1,120

Post » Mon May 19, 2008 1:36 am

Thanks, that's a good Idea.
B
2
G
4
Posts: 34
Reputation: 1,118

Post » Mon May 19, 2008 7:19 pm

Could anyone answer my save game question? Also the waypointing thing didn't work.
B
2
G
4
Posts: 34
Reputation: 1,118

Post » Wed May 21, 2008 10:41 pm

A path movement is on the to-do list. As for the save game question; i have no idea.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Wed May 21, 2008 11:05 pm

Saving is dead easy, the Save/Load to disk action stores the save game data in a file (use an expression like AppPath + "myfile.sav" to store it in the game's own folder). The Quicksave/quickload actions store the data in memory. So you can use events like:

+ On key S pressed
-> Quicksave
+ On key L pressed
-> Quickload

Press S to save, L to load last quicksave...
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Thu May 22, 2008 10:10 pm

Ok i tried the quicksave/load thing and It only loads like some sprites then the rest are invisible such as: My character sprite, and the ground, and one of the enemys. Help?
B
2
G
4
Posts: 34
Reputation: 1,118


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests