YesNoOk
avatar

Need help with moving circles (Read 156 times)

Started by Trinitronity, January 17, 2013, 04:05:12 pm
Share this topic:
Need help with moving circles
#1  January 17, 2013, 04:05:12 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
Code:
[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)
I know, that his handles the positioning of Orreries Sun based on the root's position.
However, they think, that the player is the root.
How can I mkae it like that, so the root is a different anim instead? Here is the code of said anim:
Code:
;Orreries Sun Spawner
[Statedef 3101] ;This little object allow the Orreries Sun to move like a Leaf Shield.
Type = A
Movetype= A
Physics = N
Ctrl = 1
Sprpriority = 5
anim = 3109

[State 3101]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 3101, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
time = -1
stateno = 1002
ignorehitpause = 1

[State 3101, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 3101, var]
type = varset
trigger1 = movecontact
var(0) = 1+(moveguarded!=0)

[State 3101]
type = veladd
trigger1 = 1
X = 0.2; * cos(var(0)*Pi/180)
Y = -0.1 * sin(var(0)*Pi/180)

[State 4000, Effect]
type = helper
trigger1 = time = 1
persistent = 0
helpertype = normal
name = "Planet"
ID = 3102
pos = 3,-40
postype = p1
stateno = 3102
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 4000, Effect]
type = helper
trigger1 = time = 1
persistent = 0
helpertype = normal
name = "Planet"
ID = 3103
pos = 3,-40
postype = p1
stateno = 3102
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 4000, Effect]
type = helper
trigger1 = time = 1
persistent = 0
helpertype = normal
name = "Planet"
ID = 3104
pos = 3,-40
postype = p1
stateno = 3102
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 4000, Effect]
type = helper
trigger1 = time = 1
persistent = 0
helpertype = normal
name = "Planet"
ID = 3105
pos = 3,-40
postype = p1
stateno = 3102
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 4000, Effect]
type = helper
trigger1 = time = 1
persistent = 0
helpertype = normal
name = "Planet"
ID = 3106
pos = 3,-40
postype = p1
stateno = 3102
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 4000, Effect]
type = helper
trigger1 = time = 1
persistent = 0
helpertype = normal
name = "Planet"
ID = 3107
pos = 3,-40
postype = p1
stateno = 3102
ownpal = 1
facing = 1
pausemovetime = 180
supermovetime = 180

[State 3101]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -42
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: Need help with moving circles
#2  January 17, 2013, 04:30:59 pm
  • *****
  • Mega Klinklang confirmed
    • USA
    • ricepigeon.webs.com
So instead of it circling around the root/player you want it to circle around the helper spawning it?

In that case, just change all instances of root to parent in the posset controller.

Also,

Code:
[State 3101, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
time = -1
stateno = 1002
ignorehitpause = 1

[State 3101, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1


Because I didn't fully know what I was doing back then, you can omit the SCA part from the nothitby and remove the hitby controller in its entirety.



<<-- Updated 09/14/14

You limit yourself so badly when you try to avoid variables. When you get over your fear of the "complexity" of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.
Re: Need help with moving circles
#3  January 17, 2013, 04:46:49 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
It worked, thanks!
Now I just need to change the axis from anim 3101, so it would also look like it came from Marisa instead from thin air.
Also, sorry to go off-topic, but where did you got the font for the Spellcard names from?
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: Need help with moving circles
#4  January 17, 2013, 06:14:14 pm
  • *****
  • Mega Klinklang confirmed
    • USA
    • ricepigeon.webs.com
I forgot what font it was but it wasn't a process that was as simple as typing the text. After the initial text layer was typed out, it needed to be converted into an image layer rather than a text layer, the the red-white gradient was applied. Afterwards the layer was duplicated and a third layer was used for the black outline (2 pixels I think, I tried experimenting with a Hi-res version but didnt turn out so good so I left it low-res). I think I still have the template saved in GIMP's native format which I could always upload if you're interested.

<<-- Updated 09/14/14

You limit yourself so badly when you try to avoid variables. When you get over your fear of the "complexity" of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.
Re: Need help with moving circles
#5  January 17, 2013, 06:27:17 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
I forgot what font it was but it wasn't a process that was as simple as typing the text. After the initial text layer was typed out, it needed to be converted into an image layer rather than a text layer, the the red-white gradient was applied. Afterwards the layer was duplicated and a third layer was used for the black outline (2 pixels I think, I tried experimenting with a Hi-res version but didnt turn out so good so I left it low-res). I think I still have the template saved in GIMP's native format which I could always upload if you're interested.
That would be great. Since I have finished most of the Spellcards (though I had to replace two old Spellcards with new ones, that I still have to think up), I could really need this.
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: Need help with moving circles
#6  January 17, 2013, 07:25:30 pm
  • *****
  • Mega Klinklang confirmed
    • USA
    • ricepigeon.webs.com
The intention was to try to emulate the text style used in SWR/Hisoutensoku (and I think the shmup touhou games as well used it), except with english text instead of japanese. It may not be 100% but I still thought it looked good. The only thing missing that I didn't implement was the flower bar that goes under the spellcard name's text, which the touhou games did have, but that should be as simple as adding another explod.

The thing about the template though is that it's universal, so even if you somehow managed to find the font used in the original Touhou games you could just substitute that with the font I used. I'll have to write up a tutorial for it on how to use it before I do anything (I'm sure Darkflare could use this if he's going to continue editing Lie).

<<-- Updated 09/14/14

You limit yourself so badly when you try to avoid variables. When you get over your fear of the "complexity" of variables, you will find yourself in a better place: A beautiful world where coding is actually fun.
Re: Need help with moving circles
#7  January 17, 2013, 07:40:10 pm
  • *****
  • Back to the Beginnings
    • Skype - trinitro.man

  • Online
The intention was to try to emulate the text style used in SWR/Hisoutensoku (and I think the shmup touhou games as well used it), except with english text instead of japanese. It may not be 100% but I still thought it looked good. The only thing missing that I didn't implement was the flower bar that goes under the spellcard name's text, which the touhou games did have, but that should be as simple as adding another explod.

The thing about the template though is that it's universal, so even if you somehow managed to find the font used in the original Touhou games you could just substitute that with the font I used. I'll have to write up a tutorial for it on how to use it before I do anything (I'm sure Darkflare could use this if he's going to continue editing Lie).
That would be great. Thanks!
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