YesNoOk
avatar

using P2 head position as a pos add (Read 6307 times)

Started by Momotaro, April 08, 2021, 07:20:01 pm
Share this topic:
using P2 head position as a pos add
#1  April 08, 2021, 07:20:01 pm
  • *****
  • A.K.A. NED
  • I like to draw fighting game characters...
Hello,

I'm coding a throw right now, and in the process of binding, I need to use P2 head position (from commons) as a pos add for P1.

[State 1, 1]
type = posadd
trigger1 = animelem = 1
y = #p2 head position#*const(size.yscale);;;;;;;This is just an exemple

I don't know the structure to reach these informations.

-p2 y head position
-p2 constant y scale

Any idea if something like that is possible.
Or an alternative, different from just using "pos= 0,0,head"

thanks
Re: using P2 head position as a pos add
#2  April 09, 2021, 03:12:01 am
  • avatar
  • **
    • USA
Re: using P2 head position as a pos add
#3  April 09, 2021, 07:28:31 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Thats right. If youve already hit them target or a targetID is an even more reliable method of going to the right opponent


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: using P2 head position as a pos add
#4  April 09, 2021, 07:38:39 am
  • *****
  • A.K.A. NED
  • I like to draw fighting game characters...
Re: using P2 head position as a pos add
#5  April 10, 2021, 04:12:29 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Use ID on the hitdef. You can then use

Target(ID), redirection
Or was it targetid(id) i forget. Anyway. No chance of oops using that cos simul is horrible.


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: using P2 head position as a pos add
#6  April 10, 2021, 05:02:08 am
  • ****
    • crepa.neocities.org
It is target(ID).

in the Hitdef:
ID = 1000

in the redirect:
Target(1000)

Of course change the ID to your own.
Re: using P2 head position as a pos add
#7  August 16, 2021, 08:50:01 pm
  • *****
  • A.K.A. NED
  • I like to draw fighting game characters...
Thanks a lot for your help guys.
I have to admit at fist view, I felt lost and cannot concentrate to understand your codes.
I postponed a lot and even forgot I asked help for it.

I gave a try today and finally had the result by using all your messages.
Thanks again.


I'm not sure the structure is correct, but it seems to works perfectly.
I used the code this way.

Code:
[State 181, ˆÚ“®];au début, ajust position de head
type = posadd
trigger1 = animelem = 1
y = Target(1450),const(size.head.pos.y)*const(size.yscale)+58

"+58" is a value I obtained by trial and error, testing the move against tall and short characters.