Author Topic: I can't even get my spites 2 move!  (Read 7553 times)

wildman will22

  • Visitor
  • *
  • Posts: 5
    • View Profile
I can't even get my spites 2 move!
« on: 2008-01-05, 09:50:07 PM »
I CANNOT GET MY SPRITES TO MOVE. I can't. I just can't.  >:(

I've tried everything. OK, not everything, but I just got SGDK 2 yesterday.

So, could anyone tell me how just to make the sprite move. (The first thing I tried was the tutorial, and that DEFINETLY didn't work) :crazy:

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: I can't even get my spites 2 move!
« Reply #1 on: 2008-01-06, 01:30:22 AM »
ahh read the tutorial again.

Maybe ur keyboard isnt working?

seriously we need more info, just saying ur sprites dont move and u did the tut doesnt explain anything, as other ppl have done the tut and had their's working.

wildman will22

  • Visitor
  • *
  • Posts: 5
    • View Profile
Re: I can't even get my spites 2 move!
« Reply #2 on: 2008-01-06, 01:55:32 AM »
Sorry, I start to vent when electronics don't work right.

Basically, I'm totally new to this, but I have quite a bit of experience with Gamemaker. SGDK 2 is much more complex, but also much more powerful. (and it's much easier to do very difficult things)

I'm pretty sure my keyboards working or else I would be typing this.So, it's not that. All I need to know is how you would make simple "player" sprite move around using the keyboard. If I know this, I'm pretty sure I can figure out the rest on my own.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: I can't even get my spites 2 move!
« Reply #3 on: 2008-01-06, 07:13:13 AM »
did you do the part where it says: make a plan and there a rule which says "map input to player" ?
this rule can be created in the rule tree of the player, too (i think), and it is necessary for moving the sprite to left/right when you press left/right on your keyboard.
there must also be a rule (on a plan i think), which says that your sprite indeed IS the player.
but i think you should really try again the tut. sometimes it may be very tricky, all this huge mass of text, but it works when you really try not to miss a line.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: I can't even get my spites 2 move!
« Reply #4 on: 2008-01-06, 07:19:01 AM »
Yes, you might have to make sure you got the tutorial done correctly.  Also, use the new version of the tutorial at http://sgdk2.sf.net/Documentation/Tutorial1.html because there were a few unrelated minor problems with the version in the release.  If you still can't figure it out, post your project at http://sgdk2.enigmadream.com/support/ and I can tell you what's missing.

wildman will22

  • Visitor
  • *
  • Posts: 5
    • View Profile
Re: I can't even get my spites 2 move!
« Reply #5 on: 2008-01-12, 09:05:07 PM »
K, now that I have my head on str8. What do I need to do to get a sprite to change shape? Like conditions etc.

Sorry I'm such a pain  :P, but I can't figure it out on my own!

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: I can't even get my spites 2 move!
« Reply #6 on: 2008-01-13, 04:58:41 AM »
you would need an if-condition or sth similar.

e.g.:
if ....
SwitchToState

for "if" you could take almost everything, like a parameter you give the sprite, or a counter, a map flag, whatever you want.
the best example is the tut about make the sprite walking.
when you change the condition, e.g. " if MapFlag 1 is On", you could have events in your game, which turn the map flag on or off. and so you sprite could change shape, by switching to another state.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: I can't even get my spites 2 move!
« Reply #7 on: 2008-01-13, 09:28:20 AM »
Have you looked at the SGDK2 sample project?  The player sprite can change between facing left and facing right.  If you can see how that works, you should be able to see how a sprite could change shape.  Instead of left and right, just use two states that are different shapes.  To find these rules, look at the rules tab of the player sprite definition.  Expand "If climbing" and look near the end of that list -- you will see "If moving left".  Since this rule is below the "Else" it only applies when the sprite is not climbing.  If you expand the "If moving left" rule, you'll see a rule called "then face left" that shows you how to switch the sprite to a new state, which could just as easily switch to a state that is a different shape.

wildman will22

  • Visitor
  • *
  • Posts: 5
    • View Profile
Re: I can't even get my spites 2 move!
« Reply #8 on: 2008-01-13, 07:03:43 PM »
Well, I've tried to use the "Switchtostate" rule, but it won't do anything. I've tried it on it's own, If isinputpressed, and I just tried it with a map flag like morgen above you suggested, and the sprite won't change. Is there anything that could be hindering the sprite from changing states?

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: I can't even get my spites 2 move!
« Reply #9 on: 2008-01-13, 07:56:15 PM »
did you make sure the other state is easily recognisable from the first state? i thought mine wasn't working then I realized i had both of the states face left, so it appeared they didnt change.  :-[

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: I can't even get my spites 2 move!
« Reply #10 on: 2008-01-14, 06:53:06 AM »
Are you trying SwitchToState in the sample project, or a new project of your own?  If it's in the sample project, it might be tricky for two reasons: 1) The SwitchToState rule might not be getting applied, depending on where you put it; 2) Other rules might be switching it back.  So you might have to follow every rule to see what else might be going on, which can be tricky even for an experienced programmer.  You might want to try it in a simple project of your own.    If you can't figure it out, you can submit your project at http://sgdk2.enigmadream.com/support/ and I can look into it.

wildman will22

  • Visitor
  • *
  • Posts: 5
    • View Profile
Re: I can't even get my spites 2 move!
« Reply #11 on: 2008-01-14, 07:57:22 PM »
I just figured out what I was doing wrong...and I feel like total idiot...

Ah well, that was to be expected...

ps: I was trying to change to a state that was animated, but I didn't give the sprite a rule to animate  >:(.(I probably shoulda told you that) :-[