Saving Problem And Other Question

Non-platform specific questions.

Re: Saving Problem And Other Question

Postby knucklecrunchgames » Sun Jan 05, 2014 6:12 pm

lcl wrote:If with .dat file you mean a level made in game editor and saved as .dat, then no, you can't convert it into a save file.
You can rename the file, but you can't open it with loadVars(), you would have to use LoadGame();

But however, you could use game editor to make a simple level editor, which just allows you to place objects around.
Then all you'd need to do would be to save the objects' positions to a single file and then use loadVars() to get those positions from that file
and build the level by that information by creating the correct actors to correct positions.


ah so I would just save the pos of the objects thankyou you again sky jr lol

Another question, how do you make a store?
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score

Re: Saving Problem And Other Question

Postby lcl » Sun Jan 05, 2014 6:53 pm

knucklecrunchgames wrote:ah so I would just save the pos of the objects

Yeah. If you are going to have multiple clones of a single actor, you will have to use arrays of variables.
It's really simple, when creating a variable, just set the array option from no to yes, and then define the arrays size by typing in a number.
This number is the same as your maximum amount of those actors will be, so you'd better make it something quite big.
If you don't understand what I'm talking about, I can explain it more thoroughly.

knucklecrunchgames wrote:thankyou you again sky jr lol

Haha :D

knucklecrunchgames wrote:Another question, how do you make a store?

Again, quite a big question. There's many things in making a store, but if you mean how you make the items have prices and how to make
the player lose money when buying something, it's relatively simple. Assumedly the player's money is saved to a file and can be loaded from there.
When the player buys something, you just have to first check if he has enough money (an if statement is needed for that) and if he does, then just
decrease the price of the product from the players' money and save the amount of money again.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Saving Problem And Other Question

Postby knucklecrunchgames » Sun Jan 05, 2014 7:03 pm

Again, quite a big question. There's many things in making a store, but if you mean how you make the items have prices and how to make
the player lose money when buying something, it's relatively simple. Assumedly the player's money is saved to a file and can be loaded from there.
When the player buys something, you just have to first check if he has enough money (an if statement is needed for that) and if he does, then just
decrease the price of the product from the players' money and save the amount of money again.


Is there any ged files, tutorials or videos showing how to do this?

I'd be really grateful oh and btw your name will go into the credits of my game 8)
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score

Re: Saving Problem And Other Question

Postby knucklecrunchgames » Sun Jan 05, 2014 7:06 pm

Yes Everyone.

Another question!!!

How do I make my player shoot where ever the mouse goes
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score

Re: Saving Problem And Other Question

Postby lcl » Sun Jan 05, 2014 7:48 pm

knucklecrunchgames wrote:Is there any ged files, tutorials or videos showing how to do this?

I don't think so. Most of it would be pretty easy, especially if the shop is operated with mouse.
My instructions tell you basically what you have to do. What if you try to put it together based on my instructions,
and ask me if there's something you don't know how to do? That would be easier for me.

knucklecrunchgames wrote:How do I make my player shoot where ever the mouse goes

Is your game a sidescroller game? If that's the case, it's all pretty easy.
Just have a filled region actor cover the screen, it will act as the mouse click sensor.
Then in the mouse click event of the region you go to script editor and create the bullet actor, set its angle to the mouse with the direction() function
and give it some velocity by adjusting its directional_velocity variable.

See this page for more information on variables angle and directional_velocity and for the direction() function.
(Use ctrl + f to search the items from the page.)

I'm pretty sure you can get it done by following those instructions. But should you run into problems, just ask me for help. :)
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Saving Problem And Other Question

Postby knucklecrunchgames » Sun Jan 05, 2014 7:52 pm

lcl wrote:
knucklecrunchgames wrote:Is there any ged files, tutorials or videos showing how to do this?

I don't think so. Most of it would be pretty easy, especially if the shop is operated with mouse.
My instructions tell you basically what you have to do. What if you try to put it together based on my instructions,
and ask me if there's something you don't know how to do? That would be easier for me.

knucklecrunchgames wrote:How do I make my player shoot where ever the mouse goes

Is your game a sidescroller game? If that's the case, it's all pretty easy.
Just have a filled region actor cover the screen, it will act as the mouse click sensor.
Then in the mouse click event of the region you go to script editor and create the bullet actor, set its angle to the mouse with the direction() function
and give it some velocity by adjusting its directional_velocity variable.

See this page for more information on variables angle and directional_velocity and for the direction() function.
(Use ctrl + f to search the items from the page.)

thankyou lcl
I'm pretty sure you can get it done by following those instructions. But should you run into problems, just ask me for help. :)
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score

Re: Saving Problem And Other Question

Postby knucklecrunchgames » Sun Jan 05, 2014 7:55 pm

But should you run into problems, just ask me for help. :)


If you have time. could you make a tutorial on the bullets question I asked. I wouldn't know what code goes where. :(
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score

Re: Saving Problem And Other Question

Postby lcl » Sun Jan 05, 2014 8:03 pm

knucklecrunchgames wrote:If you have time. could you make a tutorial on the bullets question I asked. I wouldn't know what code goes where. :(

I will not make you a complete tutorial. Having to figure it out yourself actually helps you a lot more, because you will have to think, and by that you'll also learn. :wink:
Here's a little more detailed guide:

You know what is a filled region? When you create an actor, you can select its type. Create a new actor and make it filled region. Then resize it so that
it covers the whole view actor, and place it on the view actor. Then just go to that filled region actor's mouse button down event and select script editor.
There click variables / functions and from the list select CreateActor. Use that to create the bullet to the position of the player actor.
Then from the very same list select direction and use it to adjust the bullet actors angle.
And then give the bullet actor's directional_velocity some value.
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Saving Problem And Other Question

Postby knucklecrunchgames » Fri Jan 10, 2014 9:55 pm

A joystick question:

First: How do you register controller 1 to player one and controller 2 to player two and ect

Second:Is there a way to emulate keys with joystick in game editor, example a= a button on joystick ect.

Thanks
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score

Re: Saving Problem And Other Question

Postby knucklecrunchgames » Sat Jan 11, 2014 6:03 pm

Oh another question guys.

what code would I use for when all clones are destroyed (Any order of them dying) they activate an event

Please answer :)

Knuckle Crunch Games
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score

Re: Saving Problem And Other Question

Postby knucklecrunchgames » Sat Jan 11, 2014 10:01 pm

Use that to create the bullet to the position of the player actor.
Then from the very same list select direction and use it to adjust the bullet actors angle.
And then give the bullet actor's directional_velocity some value.


LCL, at this point. I'm completely lost :? is there any geds or videos or tutorials anywhere, I looked 3 hours straight

THANKYOU SO MUCH FOR EVERYTHING!!! :D :D :D :D
User avatar
knucklecrunchgames
 
Posts: 1071
Joined: Wed Nov 21, 2012 8:01 pm
Location: In gameEditor.exe
Score: 17 Give a positive score

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest