Stick Page Forums Archive

Game maker issues

Started by: Cronos | Replies: 4 | Views: 1,501

Cronos

Posts: 5,440
Joined: Apr 2009
Rep: 10

View Profile
May 17, 2009 2:37 AM #419472
Ok issues im having

Imagine this game in a side view (kind of like the old mario games on gameboy)

1. How can i make it so when i hold down a button 'a' for example, the current non moving sprite will change into a moving sprite and stop on the last frame so it wont loop. And also how do i make it return to the normal sprite when i let go of a.

eg. I want to hold down the a button so the sprite crouches but doesnt loop when the animation finishes, so he stays crouching until i let go of a and he returns to normal 'standing'.

2. How can i make a sprite jump diagonaly forward and when he lands not get moved back to the location he was standing before he jumped.

eg. I want the sprite to jump forwards and land in a new position, not have the sprite moved back to the original position when i either let go of 'the button' or the animation finishes.

3. How can i make a certain sprite deal damage to a certain object 'an enemy'.

eg. Press d and the standing sprite changes into a punching sprite, and when the object collides with an enemy object "while in that sprite" either kills or deals damage to it.

4. How to make an attack that will only work in mid air/crouch position.

eg. Pressing a in the stand position initiates a punch, pressing a in a crouching postion initiates a leg sweep and pressing a in the air initiates an arial kick.

Help would be appreciated.
Flood
2

Posts: 3,326
Joined: Dec 2008
Rep: 10

View Profile
May 17, 2009 3:41 AM #419489
I'm pretty sure you can use AS in Game maker.

http://lmgtfy.com/?q=Actionscript+tutorials
Scarecrow
2

Posts: 9,168
Joined: Oct 2005
Rep: 10

View Profile
May 17, 2009 3:58 AM #419501
i'm pretty sure actionscript is for flash only


and pretty much all of those problems can be solved with basic "if" statements
Raffi
2

Posts: 4,326
Joined: Aug 2006
Rep: 10

View Profile
May 17, 2009 6:50 AM #419566
Quote from CronosXIII
Ok issues im having

Imagine this game in a side view (kind of like the old mario games on gameboy)

1. How can i make it so when i hold down a button 'a' for example, the current non moving sprite will change into a moving sprite and stop on the last frame so it wont loop. And also how do i make it return to the normal sprite when i let go of a.

eg. I want to hold down the a button so the sprite crouches but doesnt loop when the animation finishes, so he stays crouching until i let go of a and he returns to normal 'standing'.
make a "change sprite" code, set it to the changing spirte to moving, and set the trigger to "release: 'a'".
2. How can i make a sprite jump diagonaly forward and when he lands not get moved back to the location he was standing before he jumped.

eg. I want the sprite to jump forwards and land in a new position, not have the sprite moved back to the original position when i either let go of 'the button' or the animation finishes.
Having the sprite jump to a new position, as PART of the SPRITE is a bad idea. You can set a code where the player moves FOREWARD and UP, or BACKWARD and UP, by pressing Up and Left/Right. Obviously, it needs gravity codes too.
3. How can i make a certain sprite deal damage to a certain object 'an enemy'.

eg. Press d and the standing sprite changes into a punching sprite, and when the object collides with an enemy object "while in that sprite" either kills or deals damage to it.
There should be an option which lets the object change into another, using Destroy and Draw tools.
4. How to make an attack that will only work in mid air/crouch position.

eg. Pressing a in the stand position initiates a punch, pressing a in a crouching postion initiates a leg sweep and pressing a in the air initiates an arial kick.
Use "If" statements. For example, "If there is not a collision at position ____ destroy sprite _____; draw sprite ______" means "If this object is not colliding (in contact with) this area, destroy the original object and draw a new one, of course when you hold down this letter. Then set a code so when you release the button, THAT sprite is destroyed and the original is drawn.
Help would be appreciated.

Answers in bold.
Cronos

Posts: 5,440
Joined: Apr 2009
Rep: 10

View Profile
May 17, 2009 12:29 PM #419711
k thanx heaps raffi :D
Website Version: 1.0.4
© 2025 Max Games. All rights reserved.