Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by SpaceHorse

YoYo! So i started making a game.
1st thing i wanted to make is crouch mode where player could crouch.
i almost did it. just cant understand how can i handle key_up event??
all i found is
                ig.input.bind( ig.KEY.DOWN_ARROW , 'down' );

but it handles only key down event. i have to handle key up event for KEY_DOWN button. and i even saw that it's possible. but i just don't know how to write binding properly. could anyone help?

1 decade ago by SpaceHorse

Ou, i found! hooray it's:
if( ig.input.state('down') ) { ... }

1 decade ago by SpaceHorse

Now, please, anyone tell me how can i change player collision size and position in runtime.

1 decade ago by MobileMark

Hey SpaceHorse, typically the Games section on this forum is just to show games you've made and you'd like the community to see/test. If you need help with some programming, you should start a thread in the Help section. You can also use the search function to check to see if your question was already answered in a previous thread.

There is also a plethora of information in the Docs section of the site found here
http://impactjs.com/documentation

The place where the collision size of an entity is set is above the init function, it should look something like this
size: {x:48, y:96},

1 decade ago by SpaceHorse

LoL, i actually just now saw the search button) thank u.
i posted it here because i want to kinda make a game thread. like how i make it. the whole thing. why not.
Like a thread of making a game from beginning to the end. so that's why i posted it in GAMES. I have an idea about making game about uncle DOLAN :D
Why everyone is so rude to me. I just wanna make a game. i thought this forum is about it.

1 decade ago by dominic

How has MobileMark been rude? He just pointed out that this isn't the right forum to ask for help with you programming problems. There's the "Help" forum for that.

As the overview said, the Games forum is for showing your games:
Show your work-in-progress or finished games.


If you want people to help you, you have to make it as easy as possible for them to do so. Part of this means stating your problems as clear as possible. Please read what you've written before hitting the "Post" button and think if someone who has no idea what you want to do, would understand your question.

It also means to choose meaningful topic titles. If you showed us a game here about "Uncle Dolan", your topic title would be fine - but you asked for help with Input and changing the collision size of an entity and your topic title gives no indication for that.

If you have the time and determination, read How To Ask Questions The Smart Way.


Now to your question :) You can change the collision size of an entity by changing the .size.x and .size.y properties. You can do so at any time you want. So if you want you player character to become smaller when crouching, you can change this.size.y inside your if( ig.input.state('down') ) { ... }.

1 decade ago by SpaceHorse

hey hey man. i just got the wrong idea. sorry.
maybe i just need some time to get used to your society and rules.
if you like you can delete this thread.

1 decade ago by SpaceHorse

and thank you a lot for the answer.
Page 1 of 1
« first « previous next › last »