RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[GM] Need help moving

0 Members and 1 Guest are viewing this topic.

*****
Ancient Mummy
Rep:
Level 90
Well i have made a character now and have some sprites.
Yes it does move.
No, not how i want it  ;9

It moves but the sprite ain't and i try'd changing it but all i can get to work a bit is him to duck,
the moving looks like a piece of crap and everything.

I just need a good tutorial on this but all that stuff that are "Tutorials/Examples" use strange codes i dont understand.
Can anyone explain this to me :( ?
« Last Edit: March 04, 2014, 01:44:59 AM by modern algebra »

****
Rep:
Level 88
wrath of winter
Hmmm...well, if you can wait a day I can make you an example when I get back home.  Very little code involved, mostly D&D.  You are trying to get the sprites to go along with the movements, right?

Hint: sprite changes for the keyboard and key release events. 

Want a personal sig like this? Ask Firerain:
http://rmrk.net/index.php/topic,20203.0.html

*****
Ancient Mummy
Rep:
Level 90
ye i'm trying to make him walk when i press right or left,
And make a jumping sprite while jumping but not change the sprite till you fall down again.
Im a reall noob at this  :(
But im getting it i think.

****
Rep:
Level 88
wrath of winter
It's fine.  All this can be easily shown in the demo I can put together.  The falling stuff, though, will take a bit of coding, but I'll explain it in the code window (when leaving comments in GML coding, comments are preceded by a // and the words are italicized, so the comments will look something like this:

//this code checks to see if blahblahblah)

I have...what...five hours left til I leave work.  It'll take me a bit to make the demo but I should have it ready by 10 at most if I'm not delayed by dishes waiting to be washed...(dirty dishes are pure evil cuz I get stuck with them all the time...)

After a while Game Maker gets pretty easy...you just gotta find out what the functions do in different cases.  Took me a while, though, and I'm still learning.  My current game is chock full of coding and it's all the simple stuff...you'll soon get the hang of it, though.


EDIT:  I'm terribly sorry to say this but GM's giving me issues...I hate this computer.  Also I thought it'd be easy to do with D&D but in order to get around some spritechange difficulties there's coding.  I'm explaining it though...

Man I hate this...if it gets here late, I'm very sorry...didn't expect my computer to not be able to handle various programs tonight of all nights...  :mad: I've made some progress though, so don't worry.  Biggest issue here is that the jumping sprite won't change into the falling sprite unless a key is held, I'm working on fixing that.  Or would you want to use just one sprite for both jumping/falling?  That clears a lot of trouble there. 
« Last Edit: July 31, 2007, 01:39:18 AM by iceflame1019 »

Want a personal sig like this? Ask Firerain:
http://rmrk.net/index.php/topic,20203.0.html

****
Rep:
Level 88
wrath of winter
Well sorry for the double-post but after wrestling with GM I've managed this. 
 It's not perfect, since GM is acting stupid tonight, but it should give you a basic understanding.  If you're confused I'll explain, to the best of my ability.

Want a personal sig like this? Ask Firerain:
http://rmrk.net/index.php/topic,20203.0.html

*****
Ancient Mummy
Rep:
Level 90
GREAT
Im sure this will help me :D
Thank you !

****
Rep:
Level 88
wrath of winter

Want a personal sig like this? Ask Firerain:
http://rmrk.net/index.php/topic,20203.0.html

*****
Ancient Mummy
Rep:
Level 90
Great my character moves now :D

But still have a couple of questions :P

1. How can i make his jumping limit to 2, so it can jump twice only because now i can jump infinite times.

2. My character gets stuck into the wall sometimes, i think the sprite is colliding with the wall or floor can i makes sure it wont collide with them but also not fall trough it.

3.Can i make him look like he is walking, like his legs will move because they are kinda stuck now.

Sorry if i'm a pain in the ass.   

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
3.Can i make him look like he is walking, like his legs will move because they are kinda stuck now.

You could use a gif.
&&&&&&&&&&&&&&&&


****
Rep:
Level 88
wrath of winter
ooooo...that's right...ummmmmmmm...

*thinking*

Well, I'm not much of an expert on these problems...but for the double-jump you can set a variable that it checks before the jump is initiated

Post the code from the game involving the jumping and I'll reformat it for double-jumping. 

Want a personal sig like this? Ask Firerain:
http://rmrk.net/index.php/topic,20203.0.html

*****
Ancient Mummy
Rep:
Level 90
I think this is my jumping code

Code: [Select]
//This sets the sprite at the beginning of the jump

if direction<90
  sprite_index=jump_right
else if direction>90
  sprite_index=jump_left
 
//This makes him actually jump
vspeed-=20

The jumping itself is an event thing

****
Rep:
Level 88
wrath of winter
Okay... 
In the character's creation code, D&D the Variable button, label the variable jump_limit, and set it to 0.

Now change the jumping code in the Press Up event to this
Code: [Select]
//This makes him actually jump
if var.jump_limit<2
{
vspeed-=20
jump_limit+=1
}

Mess around with it til it works.  It should.  What it does is check if the variable is up to a limit.  If it isn't, he jumps and increases the variable so he can't jump again after two jumps.


Want a personal sig like this? Ask Firerain:
http://rmrk.net/index.php/topic,20203.0.html

*****
Ancient Mummy
Rep:
Level 90
ARgh !
It keeps saying there is an error with the variable line. drives me nuts   ;9

****
Rep:
Level 88
wrath of winter
oooh...ummmm...well, change the D&D variable title and the var.jump_limit to global.jump_limit.  If that doesn't work I'll ask someone cuz that's a problem.

I think the issue is that even though you create the variable and label it in the code it still doesn't find the variable.  If it doesn't work I dunno what to say, other than I can ask one of the GM mentors what the issue is.

Srry if I'm not helping... :(

Want a personal sig like this? Ask Firerain:
http://rmrk.net/index.php/topic,20203.0.html

*****
Ancient Mummy
Rep:
Level 90
AH crap, my moving is all messed up now :(
I'm sorry Iceflame but it didnt really help me much.
Can maybe someone re-explain it to me ?

********
Rep:
Level 96
2011 Most Missed Member2010 Zero To Hero
Upload your project, and I will fix it, with lots of comments for each line of code. ;8

*****
Ancient Mummy
Rep:
Level 90
Ok but don't laugh xD

And its danny phantom because i took the first random thing that i thought was cool to me so i could only use it to learn the program.
But if it is gonna work i will make it a reall platformer :D

I appreciate you want to help me :D


****
Rep:
Level 88
wrath of winter
man, if GM had worked better...sorry I wasn't much of a help.  Oh well.

Want a personal sig like this? Ask Firerain:
http://rmrk.net/index.php/topic,20203.0.html

*****
Ancient Mummy
Rep:
Level 90
Its ok Iceflame you also thought me stuff of GM i wouldnt noticed otherwise

****
Rep:
Level 88
wrath of winter
yay...

As fighter from Nuklear Power says, "I'm a helper!"

yeah I think I need to get a little better with coding once I can get my personal computer to runs properly.  But at least someone benefitted...I have some purpose... ;D

Want a personal sig like this? Ask Firerain:
http://rmrk.net/index.php/topic,20203.0.html

********
Rep:
Level 96
2011 Most Missed Member2010 Zero To Hero
I'm almost done Snailer. I installed a camera system, commented each code I used, explained a few concepts, and organized your stuff. :D

*tip*: When naming objects, sprites, and sounds, do not uses spaces, and use capitalized letters sparingly. GML cannot handle spaces in names, (skips them) and capitalized letters can easily lead to user error.
« Last Edit: August 02, 2007, 07:46:07 PM by Arrow-1 »

****
Rep:
Level 88
wrath of winter
yeah...I found that out the hard way.  If you want to use a space use a _ dash.  Always use lowercase letters, and keep the names memorable and non-confusing, and never have any two resources have the same name.

Want a personal sig like this? Ask Firerain:
http://rmrk.net/index.php/topic,20203.0.html

********
Rep:
Level 96
2011 Most Missed Member2010 Zero To Hero
Okay Snailer, here you go! For some reason, the monster won't animate. I check over all of it's code, and logically there's nothing stopping it from doing so... :-\

Everything else works really well now though. Hope you like! If you have any questions, feel free to ask.

*****
Ancient Mummy
Rep:
Level 90
SWEEEEEEEEEEET
THANK YOU THANK YOU THANK YOOUU

And i think the camera IS working because its kinda zoomed in :P