Chain Chomp Chain code?

Started by Isabel Strider, July 06, 2011, 11:16:22 PM

Previous topic - Next topic

Isabel Strider

i think maybe it could be done working on the DavidGee code for Point to Point Equation, but i'm really bad at codding, and i´m going to start a "Chained" Werewolf" character soon, and i would like to achieve a chain effect similar to the Chain chomp character from the Mario Bros Series in the 16 bit era... several independent frames that dinamically chage it's y and x position based on the distance between the character and the spot it's chained to; more move if it's nearer to the character than to the spot

[State ****: Null]
type = Null
trigger1 = (!Time)
trigger1 = (FVar(0) := (P2Dist X * 10) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))
trigger1 = (FVar(1) := (P2Dist Y * 10) / (Exp(0.5*ln((P2Dist X * P2Dist X) + (P2Dist Y * P2Dist Y)))))

[State ****: VelSet]
type = VelSet
trigger1 = (Whatever)
x = FVar(0)
y = FVar(1)


Hope you can help me
Thanks a lot!
Me encontraste en un negro camino como un peregrino sin rumbo ni Fe... pero la Luz de tus Ojos Divinos cambió mi suerte por Dicha y placer.... ¡AY DOLOR YA ME VOLVISTE A DAR!

Cyanide

Confused on your description there. You want to sorta, increase friction as the distance from the parent increases? Or.. yeah, i'm lost here. Explain. In this case, video if necessary. Does any character from a regular fighter have something similar?


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.

Isabel Strider

i'm sorry for the confusion.... this is the behaviour i'm talking about

http://www.youtube.com/watch?v=OhaJKU8f7MY

Thanks!
Me encontraste en un negro camino como un peregrino sin rumbo ni Fe... pero la Luz de tus Ojos Divinos cambió mi suerte por Dicha y placer.... ¡AY DOLOR YA ME VOLVISTE A DAR!

Odb718

#3
How many links are you planning on using?? You you want it to look like there's gravity or would you want something like link's grappling hook that's always taut?

I'd start by making the wolf only allowed a certain distance of x+y. Then you'd have to latch one link to the spot and one link to the wolf. After that you'd want one in the middle of the two links. Then you'd make two similar links, but one in the middle of the middle and the spot's link. The other in the middle of the middle and the wolf's link. on and on until there was enough pixels to cover the original maximum distance. 

----
^^^^^ for the taut chain.

For the gravity you'd have to come up with a way of checking the distance of the links from each other.
I'll try to draw it out
[A1][E3][D1][E1][C1][E2][D2][E4][B1]
A is the spot, B is the wolf, C is the middle. Now if the distance between A and C drops below say 50, then gravity affects the position of C. You'd move C on the X and Y axis and the other ones would follow. To a point. They'd still be taut and it would look like a V. You'd have to mimic that code for each link.
vVv Gouken718 vVv SabreTooth718 vVv


Isabel Strider

yeah, i would like to have a chain that can react to gravity to.... well.... i was thinking maybe to around 5 to 10 links.... that's the idea..... i'll have to read several time s the description to come out with the code...
Me encontraste en un negro camino como un peregrino sin rumbo ni Fe... pero la Luz de tus Ojos Divinos cambió mi suerte por Dicha y placer.... ¡AY DOLOR YA ME VOLVISTE A DAR!