YesNoOk
avatar

Question about cicular movement and more (Read 286 times)

Started by Trinitronity, November 25, 2012, 02:04:15 pm
Share this topic:
Question about cicular movement and more
#1  November 25, 2012, 02:04:15 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Code:
[Statedef 3102]
movetype = A
physics = N
ctrl = 0
anim = 1998
velset = 0,0
sprpriority = 1

[State 1010, VA]
type = varadd
trigger1 = time || ((time = 0)&&(var(40) > 0))
var(40) = 1

[State 1010, NHB]
type = nothitby
trigger1 = 1
time = -1
value = ,AA,AT
ignorehitpause = 1

[State 1010, HOR]
type = hitoverride
trigger1 = 1
time = -1
slot = 1
attr = SCA,AA,AP,AT
stateno = 3001
ignorehitpause = 1

[State 1010, CA]
type = changeanim
trigger1 = time = 0
value = 3102+1*ishelper(3103)+2*ishelper(3104)+3*ishelper(3105)+4*ishelper(3106)+5*ishelper(3107)

[State 1001, AFI]
Type = AfterImage
Trigger1 = var(1) = 0
Trans = Add
Time = -1;2
Length = 8
TimeGap = 3
FrameGap = 1
PalBright = 0,0,0
PalContrast = 128,128,128
PalAdd = 0,0,0
PalMul = .8,.8,.8

[State 1001, Anglesetter]
type = Null
triggerall = var(40) = 0
trigger1 = ishelper(3102)
trigger1 = (var(0):= 0) || 1
trigger2 = ishelper(3103)
trigger2 = (var(0):= 60) || 1
trigger3 = ishelper(3104)
trigger3 = (var(0):= 120) || 1
trigger4 = ishelper(3105)
trigger4 = (var(0):= 180) || 1
trigger5 = ishelper(3106)
trigger5 = (var(0):= 240) || 1
trigger6 = ishelper(3107)
trigger6 = (var(0):= 300) || 1

[State 1001, VS]
type = varset
trigger1 = 1
fvar(0) = ifelse(var(40)<30,var(40)/30.0,ifelse(var(40)>=120,(150-var(40))/30.0,1.0))

[State 3102, STS]
type = statetypeset
trigger1 = var(40)>=130
movetype = I

[State 1010, PS]
type = posset
trigger1 = 1
x = floor(root,pos x)+floor(120*fvar(0)*cos((var(0)+5.0*var(40))*pi/180.0))*(-(root,facing))
y = floor(root,pos y)+floor(120*fvar(0)*sin((var(0)+5.0*var(40))*pi/180.0))+root,const(size.mid.pos.y)

[State 1101, HD]
type = Hitdef
trigger1 = (root,var(6) > 0) || var(3)
trigger1 = movecontact = 0
trigger1 = var(3) < 3
attr = A, HP
damage = ceil(30*(root,fvar(10))**0.5),20
getPower = 0,0
givepower = 20,20
animType = Hard
pauseTime = 0,10
hitflag = MAFP
guardFlag = MA
sparkNo = s8020+(random%2)
guardSparkNo = s8030
sparkXY = -10,0
hitSound = s1,3
guardSound = s2,0
ground.Type = High
air.Type = High
ground.SlideTime = 12
ground.HitTime = 24
air.HitTime = 24
ground.Velocity = -2
air.Velocity = -2,-2
airGuard.Velocity = -2,-2
Fall = 1
fall.Recover = 0
;fall.RecoverTime = 30
guard.Dist = 100
id = 3100

[State 1010, VA]
type = varadd
trigger1 = movecontact >= 16
var(3) = 1

[State 1010, VA]
type = movehitreset
trigger1 = movecontact >= 16

[State 1010, VA]
type = parentvaradd
trigger1 = movehit
persistent = 0
var(6) = -1

[State 1001, ASS]
Type = AssertSpecial
Trigger1 = 1
Flag = Noshadow

[State 1001, SPR]
Type = SprPriority
Trigger1 = 1
Value = 5
ignorehitpause = 1

[State 1001, AIT]
Type = AfterImageTime
trigger1 = root,stateno != 3100
trigger2 = root,movetype = H
trigger3 = root,alive = 0
trigger4 = var(40) >= 150
time = 0

[State 1001, Zeeky]
type = DestroySelf
trigger1 = root,stateno != 3100
trigger2 = root,movetype = H
trigger3 = root,alive = 0
trigger4 = var(40) >= 150
At the moment, Orreries Sun is just a copy of Mima's Orreries Solar System.
Now, I want to add a new part. Instead of going back to the player, I actually want the orbs to be launched horizintally, while they still keep their circular movement. How do I do that?
Thanks in advance!
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: Question about cicular movement and more
#2  November 25, 2012, 04:21:17 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
I don't know what Orreries Sun is for this character and I can't be bothered with trying to figure out the point of all of those variables in the posset code (this is where the rotation is being emulated). If it wasn't posset, I would tell you to add a constantly increasing value to the X parameter's value, but then facing becomes an issue.

It would be easier if you were to bind the above helper to a different, blank helper that was, in turn, bound to the root. Then, all you would need to do is add velocity to the blank helper and its rotating children would follow it.


Re: Question about cicular movement and more
#3  November 25, 2012, 06:02:02 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
I don't know what Orreries Sun is for this character and I can't be bothered with trying to figure out the point of all of those variables in the posset code (this is where the rotation is being emulated). If it wasn't posset, I would tell you to add a constantly increasing value to the X parameter's value, but then facing becomes an issue.

It would be easier if you were to bind the above helper to a different, blank helper that was, in turn, bound to the root. Then, all you would need to do is add velocity to the blank helper and its rotating children would follow it.



Hmm, that could work.
However, when they're launched forward, I also want them to add them an additional ability: the ability to latch on opponents. Can I make it like that, so the old orbs get replaced with the new orbs while keeping their movement (which seems to be controlled by var(40) and fvar(0))?
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: Question about cicular movement and more
#4  November 25, 2012, 09:14:14 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Go into the code library. Look up the oroboros code in the code archive thread. This uses bind to parent.

Create a helper, have it create your circle movement helpers which bindtoparent (code is pretty clear) and have the original helper do the movement.

I have used this in my unfinished Shuma for mystic stare.


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: Question about cicular movement and more
#5  November 26, 2012, 05:05:45 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns
Re: Question about cicular movement and more
#6  November 26, 2012, 09:42:14 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
No, because that's not in the code archive thread nor does it include the word oroboros.


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: Question about cicular movement and more
#7  November 27, 2012, 01:29:46 am
  • ******
    • www.justnopoint.com/
Re: Question about cicular movement and more
#8  November 27, 2012, 04:44:53 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
I make characters RP-styled (Current WIP: Marisa):
http://mugenguild.com/forum/topics/marisarp-150600.0.html
Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
you are all small and can't grow manly sideburns