Behaviour for character swinging

zhero

  • Posts: 117
hi guys, i wnt to make game with ability character can swinging like spiderman, but i dontknow how to make that.
can you help me??
and how to make character attack with sword, and do combo attack?

i need tutorial for  behaviour swinging, attack with sword, and do combo attack.

Thankyou very much ^^

« Last Edit: November 20, 2014, 04:42:08 am by zhero »

letmethink

  • *
  • Posts: 2545
I'm going to ask this like many times before. What have you tried? What don't you understand?
~Letmethink

zhero

  • Posts: 117
Like I ask before. I don't understand how to make character swinging,Attack with sword,and do combo attack with sword. I have no idea for that behaviour

SadiQ

  • Posts: 1791
Then you'll probably get a very quick and ugly response like this:
1 . Swinging a character can be achieved by using joints (there's a joint extension in the forum).
2. For the sword you could use a different animation for your actor and check for collisions based on that animation.
3. For combo attack you can use some booleans and a timer.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

zhero

  • Posts: 117
can you give me tutorial for making that? swinging, attack with sword? and combo??

thanks for your response

SadiQ

  • Posts: 1791
1. You'll need to use the Joints extension. In this game I used a distance joint that I created when the user presses a button.
2. Use the Search button in the forum. This question has been answered already.
3. You should post a separate thread for this question AFTER you completed step2.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

zhero

  • Posts: 117
1. i do but it not work, dnt know how to put behaviour code for that (need video anyway) or can you upload your sample game in stencyl forge :)

i want make ninja game with ability can swing :)
2. what keyword for search that?

letmethink

  • *
  • Posts: 2545
1. i do but it not work

What have you tried?

2. what keyword for search that?

I'm not sure on what to search for that, but reading this. should be interesting especially the section titled: Design Problem: More Animations or More Actors? for creating an attack
~Letmethink

zhero

  • Posts: 117
can you addyour swinging character in stencyl forge? sample game anyway

SadiQ

  • Posts: 1791
This is what you need to do to have a character swing in your game:
EDIT: Images removed.

You can then tweak the physics settings of the actor and the gravity to obtain the feel you want.

« Last Edit: November 25, 2014, 09:17:07 am by SadiQ »
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

zhero

  • Posts: 117
ok i will try it, thanks for your help :)

zhero

  • Posts: 117
I have tried, and i dont undrstand at all. which atribute i must put on actor, what is distance joint?
can you give me tutorial for making that?

i dont undrstand if you explain only few part  :'(

mdotedot

  • Posts: 1585
Hello Zhero,

Just tried it myself as I was also interested in the way SadiQ created his game.

* Download the joints extension
* Extract the files to the $HOME/Stencylworks/engine-extensions directory (search for forum if you want to know more about installing extensions) $HOME ... location is for Macintosh
* Create new game with a lot of tiles on the horizontal axes : width : 100 for instance
* Go to Settings -> Extensions : you should see Joints extension; if you don't see this restart Stencyl and/or the procedure to put extension in the right folder
* Make scene with 85 vertical down physics setting
* Create or use a tilesheet
* Create actor
* Put actor on screen
* Below actor put some tiles so that the actor does not fall straight away
* Create the blocks from SadiQ on the Scene level (!)
* Run

The only change I made is to put a 'always active' block on creation event from the actor so that if the actor leaves the screen you can still use the joint to get it on camera.

Hope this helps.

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

zhero

  • Posts: 117
how to instal joint extension?
im download joint extension from http://community.stencyl.com/index.php?topic=31947.0

after finish download, im open my stencyl, go setting - instal extension and i choose joint.rar  , nothing happen after click that.

mdotedot

  • Posts: 1585
* Extract the files to the $HOME/Stencylworks/engine-extensions directory (search for forum if you want to know more about installing extensions) $HOME ... location is for Macintosh

For Windows it is: %APPDATA%\Stencyl\stencylworks\engine-extensions

Extract the archive into this directory so that the folder 'joints' is in that directory.

« Last Edit: November 23, 2014, 10:23:28 pm by mdotedot »
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.