YesNoOk
avatar

How do I make a proejctile bounce (Read 2231 times)

Started by I wish for nuclear winters., May 15, 2011, 05:30:00 pm
Share this topic:
How do I make a proejctile bounce
#1  May 15, 2011, 05:30:00 pm
  • **
  • N*GGAS
    • UK
    • chucknorrism.com/
I am makeing a roblox character and I want one of his projectiles to bounce. (same velocity as the slingshot from ROBLOX)
(sorry about the lockign thread thing)
Last Edit: May 15, 2011, 07:52:09 pm by mahboy
Re: How do I make a proejctile bounce
#2  May 15, 2011, 11:44:08 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You need to use a helper. To accomplish this. Make your character perform the actions you wish the helper to do. Then alter the animations and create a new state in which a helper is created pointing to the states you have just made up.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: How do I make a proejctile bounce
#3  May 15, 2011, 11:59:55 pm
  • avatar
  • ****
  • I'm behind you!!!
in the helper isn't it possible to make it bounce by adding ither a velset or veladd when the projectile helper hits the ground..possible variable resets of their own...maybe it sounds idiotic but I'm just asking...I understand helper actions but I was just wondering if that's possible
Re: How do I make a proejctile bounce
#4  May 16, 2011, 12:02:32 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Projectiles using type = projectile cannot bounce.

Helpers you can use type = gravity, and change them to a new state when they reach ground level to repeat the action. You don't need variables for everything.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: How do I make a proejctile bounce
#5  May 16, 2011, 12:06:46 am
  • avatar
  • ****
  • I'm behind you!!!
thanks...I was just asking...I know type = projectile can only fly straight...I'm still learning stuff and figured I'd ask since this topic came up...I recently made a few helpers for a friend for his Simon wip regarding throwing weapons, Axe, holy water, knife...

the axe I made to arc in mid air and bounce off player 2 if guarded and to destroyself when it hits the ground or pos Y >=0

Re: How do I make a proejctile bounce
#6  May 17, 2011, 05:46:05 am
  • **
  • N*GGAS
    • UK
    • chucknorrism.com/
Can you give me a code instead?
Re: How do I make a proejctile bounce
#7  May 17, 2011, 05:51:33 am
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
Download my Batman and look at the helper code for Batarangs.

Basically :
- Helper moving forward as a usual projectile.
- Movecontact -> It goes to a new state.
- In this new state, you give it negative velX to make it bounce back, and physics=A to make it fall down (or physics = N and you control the gravity with "VelAdd" or "Gravity").
- When Pos Y >= 0, go to a new state.
- In this new state, make the projectile fade out, or whatever you want the graphics to behave like.
Re: How do I make a proejctile bounce
#8  May 17, 2011, 05:57:06 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
You aren't going to learn much if all we do is provide you with code. ATTEMPT to code it, when or if you fail come back, show us what you have and tell us what isn't working.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: How do I make a proejctile bounce
#9  May 17, 2011, 09:19:37 am
  • avatar
  • ****
  • I'm behind you!!!
They are easier than you think dude...Way more useful too...also in your cmd you may wanna put in its command state this....triggerall=numhelper(xxx)<1 so you cant shoot another one till the first one either hits, is guarded or just destroys itself from going offscreen...Good luck
Re: How do I make a proejctile bounce
#10  May 19, 2011, 04:23:16 am
  • **
  • N*GGAS
    • UK
    • chucknorrism.com/
My character clones himself and the clone does nothing.
Re: How do I make a proejctile bounce
#11  May 19, 2011, 04:28:21 am
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
Bad HitOverride to a state that doesn't exist, or you just forgot the hitoverride.
Post your code for the helper.
Re: How do I make a proejctile bounce
#12  May 19, 2011, 04:29:36 am
  • ****
  • Best supporting character in history of anime.
    • USA
    • www.youtube.com/user/aznperson569M
Did you put in the wrong helper? In the helper state, you have to list what stateno you want it to go to. Maybe you put in the wrong number.

EDIT: Or what Cybaster said

ANOTHER EDIT: What's up with your movecontact below

uguu
Re: How do I make a proejctile bounce
#13  May 19, 2011, 04:29:58 am
  • **
  • N*GGAS
    • UK
    • chucknorrism.com/
Bad HitOverride to a state that doesn't exist, or you just forgot the hitoverride.
Post your code for the helper.

[State 230, Helper]
type = gravity
trigger1 = animelem = 1
helpertype = normal ;player
Movecontact ->
name = "slingshot"
ID = 231
stateno = 231
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
i jsut changed it, Now my character sinks like there was quicksand on the floor.
Re: How do I make a proejctile bounce
#14  May 19, 2011, 04:30:38 am
  • **
  • N*GGAS
    • UK
    • chucknorrism.com/
Did you put in the wrong helper? In the helper state, you have to list what stateno you want it to go to. Maybe you put in the wrong number.

EDIT: Or what Cybaster said
My helpe number is 231.

GT

Re: How do I make a proejctile bounce
#15  May 19, 2011, 04:36:54 am
  • *****
    • USA
    • Skype - gt_ruby

[State 230, Helper]
type = gravity
trigger1 = animelem = 1
helpertype = normal ;player
Movecontact ->
name = "slingshot"
ID = 231
stateno = 231
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
i jsut changed it, Now my character sinks like there was quicksand on the floor.

What did you use gravity for? This block is supposed to call the helper and define it's state.
Yeah Titiln, in fact, You Made Him
Re: How do I make a proejctile bounce
#16  May 19, 2011, 07:23:19 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
I TOLD you what to do.

Make your character. As he is. RIGHT NOW perform the same actions you need the helper to perform. Make him fly forwards and bounce using 2 states. When he behaves like you want the helper to do create a NEW state and in that state call the first state you created.

Honestly, it doesn't look like you really tried at all. And as you attempted to put gravity in a helper creation. Please read mugen\docs\sctrls.html I don't expect you to memorise it but at least read every single sctrl name and look up ones that don't make any sense at all.

Seriously here. No copy paste code. He needs to learn and being able to patch in something that functions is not going to help him do that.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.
Re: How do I make a proejctile bounce
#17  May 19, 2011, 08:05:29 pm
  • avatar
  • ****
  • I'm behind you!!!
Lol at the type = gravity. like the others said....yer sposed to call the helper...you put type = helper...not type = gravity.. thats all Imma help you with...the rest is up to you.
Last Edit: May 19, 2011, 08:11:54 pm by Zombie Sagat
Re: How do I make a proejctile bounce
#18  May 19, 2011, 11:32:35 pm
  • ****
  • Best supporting character in history of anime.
    • USA
    • www.youtube.com/user/aznperson569M
He must of gotten confused because of this;

Helpers you can use type = gravity, and change them to a new state when they reach ground level to repeat the action. You don't need variables for everything.

Cyanide meant that in the helper's state, you can add a gravity sctrl to it.

uguu