Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [HELP](Gamemaker 7.0 basic) Spritesheets & Transitions  (Read 2660 times)

0 Members and 1 Guest are viewing this topic.

Gamemaker64

[HELP](Gamemaker 7.0 basic) Spritesheets & Trans...
« on: August 10, 2008, 01:08:25 pm »
My name is Krystian and English is not my native tongue - that's why I am looking for straight-forward explanations in simple form to my questions. I am new to Gamemaker and I have encountered two problems so far which I cannot solve. I am using a basic ( free ) version of 7.0.

I have visited many websites providing sprites , 90% of them provided are spritesheets. Is it possible to add the whole spritesheet as one sprite? If yes - how? If not - what are they used for then? Cut out each sprite individually?

Second question - transitions. Let's say a character reaches a certain object , after colliding with that object I would like my character to transition into the next room. How to perform this action?

Thank you for any help provided ,
Sincerely yours ,
Krystian.
 
Logged
Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #1 on: August 10, 2008, 01:45:14 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2245
1. Look up strips in the manual, has a whole page dedicated to it
2. Add a collision event to your object, if using Drag and Drop you'll want to use the 'Different Room' action (Using GameMaker > Actions > Main actions, set 1 in the manual) otherwise you you're using GML you should look under the 'Rooms' page in the manual (The Game Maker Language (GML) > Game play > Rooms)
Logged

Gamemaker64

Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #2 on: August 10, 2008, 02:09:16 pm »
if using Drag and Drop you'll want to use the 'Different Room' action (Using GameMaker > Actions > Main actions, set 1 in the manual)

Yes , I am using " Drag and Drop " but because of my poor understanding of English - I am confused. Where do I find " GameMaker > Actions "? Is it inside " Object properties " , or is it somewhere on the upper control panel? Pardon me for the inconvenience and please explain.
Logged
Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #3 on: August 10, 2008, 02:14:06 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2245
I'm referring to sections in the manual, which provide a full explanation as to the features you are requesting.
That thing that pops up when you hit the 'F1' key while in Game Maker.
Logged

Gamemaker64

Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #4 on: August 10, 2008, 02:27:16 pm »
Okay - I found out how. Thank you for your help , I still cannot find any help related to the spritesheets though. I'll keep looking.
« Last Edit: August 10, 2008, 02:30:03 pm by Gamemaker64 »
Logged
Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #5 on: August 10, 2008, 02:39:34 pm »
  • is Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 185
I'l explain it to you:
Create Event: This is where you place the setting for the Character. (like global.water=0 and stuff
Step Event: This is where the character Move. There are two options for this:
1. you can use the Step Event and GML coding
2. You can use the KeyPress event
Keypress Events:This is realy easy, just place the GML coding, open it and write how fast he is going.
E.G: Select the PressUp Event and place the GML Icon in the Event. Inside the GML code You Write: vspeed = -2;

NOTE: When writing in GML, do not use BIG letters.

Draw Event: This is good for placing the sprite. Launch a GML and open it. There you write:
if (global.directions=U) { sprite_index=sprPlayerUp; }

Here's the Step Event I use for my game:
if (holdd ||holdu || holdl || holdr) && !usingsword{
    // Change sprites if you haven't already
    if (!moving) {
        if (holdd) { sprite_index=sprLinkRunD; global.facing="D" }
        else if (holdu) { sprite_index=sprLinkRunU; global.facing="U" }
        if (holdl) { sprite_index=sprLinkRunL; global.facing="L" }
        else if (holdr) { sprite_index=sprLinkRunR; global.facing="R" }
    }
    moving=1

Or You can look through Youtube videos or Google.
Logged
http://zfghq.smfforfree3.com/index.php

My forum!!
<a href="http://www.factorizer.co.uk" title="Funny Facts"><img src="http://www.factorizer.co.uk/Zeda fan gamer,0,ffffff,000000,0.png" alt="Funny Facts" />[/url]

Gamemaker64

Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #6 on: August 10, 2008, 02:48:26 pm »
In the guide - I also cannot find a solution to my problem concerning sounds. I have added a simple midi tune , selected it as background music. Added a new invisible object with the properties of creating a sound ( I selected the one I previously added ) , but nothing plays when I start the game.

Solutions?
Logged
Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #7 on: August 10, 2008, 03:21:07 pm »
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Posts: 280
Hum, you could try to use a normal sound instead background sound. If you want to use a .mp3 sound, use the multimedia player kind.
« Last Edit: August 10, 2008, 03:26:30 pm by Venyux »
Logged
Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #8 on: August 11, 2008, 08:08:17 am »
  • is Awesome
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 185
Hum, you could try to use a normal sound instead background sound. If you want to use a .mp3 sound, use the multimedia player kind.

No, thats the owrst thing you can do, use the "sound_add" function.
Quote
// Load sounds to memory
song = sound_add("Music/Field.mp3",3,1);
sound_loop(song);
it loads the .mp3 file from the outside the game wich use less FPS and not løagging at all.
Logged
http://zfghq.smfforfree3.com/index.php

My forum!!
<a href="http://www.factorizer.co.uk" title="Funny Facts"><img src="http://www.factorizer.co.uk/Zeda fan gamer,0,ffffff,000000,0.png" alt="Funny Facts" />[/url]
Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #9 on: August 11, 2008, 08:37:11 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
Did you ever find the help you needed on the sprite sheets?  It seems like most people in this topic missed the point.  Anyway, yeah, sites that hold many resources often put together collections of sprites into sprite sheets.  To create sprites from this, you could edit the sheet with an outside editor such as Microsoft Paint, but that is too much work.  If you want to create a sprite from a sprite sheet, do this in Game Maker:
- Add Sprite
- Edit Sprite
- Go to File -> Create from Sheet
- If you have additional sub-images to add to the animation, then go to File -> Add from Sheet

Not really sure about sounds as I do not use them much, but you could try creating the sound in the room creation event which is found at Room Properties (the room you want the sound to play in) -> Settings -> Creation Code so that it plays right away.  Make sure the volume of the music is audible and that you do not have your computer's volume muted or low; I am not saying to crank up the sound on your computer, just make sure it is on, lol.
Logged

Gamemaker64

Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #10 on: August 12, 2008, 12:14:53 pm »
Guys - I have another problem. I solved the problem with the sprite-sheets and transitions ( still not with the sound ). I have added four sprites which each consist of sub-images. My following sprites are = my hero going up , down , left and right.

Then I create 4 objects representing the movement for each of the sprites. For hero going left sprite - key press - left.

I run the game , the character starts with the position going down ( that's not a mistake because I haven't added a sprite representing the idle position ) but when I press down the character doesn't want to move right , or left , or up.

What have I done wrong? Thanks

PS; I am not working on any game , because that would be stupid at this point of my knowledge , but I wish to learn more about GM , that's why I need YOUR help! =)
Logged
Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #11 on: August 12, 2008, 12:25:40 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
Guys - I have another problem. I solved the problem with the sprite-sheets and transitions ( still not with the sound ). I have added four sprites which each consist of sub-images. My following sprites are = my hero going up , down , left and right.

Then I create 4 objects representing the movement for each of the sprites. For hero going left sprite - key press - left.

I run the game , the character starts with the position going down ( that's not a mistake because I haven't added a sprite representing the idle position ) but when I press down the character doesn't want to move right , or left , or up.

What have I done wrong? Thanks

PS; I am not working on any game , because that would be stupid at this point of my knowledge , but I wish to learn more about GM , that's why I need YOUR help! =)
for starters, you can save yourself a lot of time by only changing the sprite_index in one object, and making a variable that changes depending on the direction of the object.
Also, using either the key(whatever key) and not press key, or release key, and within that event make the x or y value change an amount each step, it will also allow for diagonal movement very easily. Alternatively, but a little more complicated, you can create a code file in the step event that checks the key, and then preforms movement.
Sorry if not much of this makes sense, I'm not good at explaining things.
If none of
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.

Gamemaker64

Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #12 on: August 12, 2008, 12:38:48 pm »
Well - since I did not understand anything , not because of your explanation but because of my poor knowledge of the program , are there any default codes on the web for that? I've seen many different codes , maybe there is one for default movement? If not , I apologize and kindly request a simpler explanation , perhaps a video of some sort could help.
Logged
Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #13 on: August 12, 2008, 04:37:50 pm »
  • Doesn't afraid of anything
  • *
  • Reputation: +42/-0
  • Offline Offline
  • Gender: Male
  • Posts: 7002
Well - since I did not understand anything , not because of your explanation but because of my poor knowledge of the program , are there any default codes on the web for that? I've seen many different codes , maybe there is one for default movement? If not , I apologize and kindly request a simpler explanation , perhaps a video of some sort could help.

Basically, what he is saying is make one object for the player and set his sprite to the idle sprite.  Create an event called "Step" (it's got a pic of footprints next to it).  Now for your drag and drop command, use "Execute a piece of code"  and a code window will come up.  You'll want to do something like this for the code...

Code: [Select]
if (keyboard_check(vk_left))
{
x -= 2;
sprite_index = walkleft
}

if (keyboard_check(vk_right))
{
x +=2
sprite_index = walkright
}

if (keyboard_check(vk_up))
{
y -=2
sprite_index = walkup
}

if (keyboard_check(vk_down))
{
y +=2
sprite_index = walkdown
}

Where you see sprite_index = walkup and all those things.  walkup, walkdown, walkleft etc are sprite names.  Yours may change depending on what you call the sprites.  Make 4 different sprites, one for each direction, and load all the frames for the sprite (a frame being a part of an animation).  And that is pretty much it =D
Logged



i love big weenies and i cannot lie

Gamemaker64

Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #14 on: August 12, 2008, 06:50:31 pm »
Thank you very much Zero! You've helped me a lot ,both with explaining the process and supplying a code.

Logged
Re: [HELP](Gamemaker 7.0 basic) Spritesheets & T...
« Reply #15 on: August 13, 2008, 07:04:29 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
Thank you very much Zero! You've helped me a lot ,both with explaining the process and supplying a code.


I would of... I wasn't online though ;).
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.924 seconds with 70 queries.

anything