Struct CPoint

Source
pub struct CPoint {
Show 18 fields pub kind: CPointKind, pub x: i32, pub y: i32, pub cover: bool, pub decrease: i32, pub dir_control: bool, pub hurtable: bool, pub injury: i32, pub a_action: FrameNumberNext, pub j_action: FrameNumberNext, pub v_action: FrameNumber, pub t_action: FrameNumberNext, pub throw_injury: i32, pub throw_vx: i32, pub throw_vy: i32, pub throw_vz: i32, pub front_hurt_act: FrameNumberNext, pub back_hurt_act: FrameNumberNext,
}
Expand description

Aligns the character that is holding and the one that is held.

See https://lf-empire.de/lf2-empire/data-changing/frame-elements/177-cpoint-catch-point?showall=1

Fields§

§kind: CPointKind

Catching object or caught character.

§x: i32

X coordinate.

The catching character and the caught character’s CPoint coordinates align with each other.

§y: i32

Y coordinate.

The catching character and the caught character’s CPoint coordinates align with each other.

§cover: bool

Adjusts the facing direction and whether it is drawn behind the catcher.

Here you can set whether the caught character is shown behind or in front of your character. Leaving this tag out will let the caught character be faced towards the catcher while behind behind him.

Assume the tag written as “cover: AB” with A and B being the values being displayed below:

A:

  • 1 aligns the caught character to face the same direction.
  • 2 aligns the caught character to face the opposite direction.

Anything else does does not change the caught characters facing.

B:

  • 0 displays the caught character behind the catcher (z position -1).
  • 1-9 displays the caught character in front of the catcher (z position +1).

Because these work via z positioning they can fail on the z edges of a background.

§decrease: i32

Catching timer decrease value.

As soon as a decrease is used, the cpoint will only last for a certain period of time. Here you can set which frame should be used for the held character after the time is up: If you set the value to 3 the character goes to frame 211 (jump), if you use 7 or -7 the character switches to frame 181 (falling).

decrease: seems to be something like fall: on an itr, however inverted as negative values actually lower the “time” left till the caught character drops (always falling) and positive values do nothing / increase the value determining the drop (might actually use the fall value). The character is always released in the jump frame if you leave into a frame without a cpoint before decrease takes effect (or using throwvx: or a non cpoint vaction:), regardless of the last decrease value.

§dir_control: bool

Whether the catcher switches direction when a direction key is pressed.

Used in throw_lying_man frames. If the value is 1 you can change directions, if it’s 0 you can’t.

Note: dircontrol: requires at least wait: 2 to work.

§hurtable: bool

If other characters can hurt the caught character

1 if they can, 0 if not.

§injury: i32
§a_action: FrameNumberNext

Frame number to switch to when the Attack button is pressed.

§j_action: FrameNumberNext

Frame upon pressing jump.

jaction: will ignore the mp value of the target frame, however using hit_j: will completely ignore the jaction:.

§v_action: FrameNumber

Frame number that the caught character should be on.

§t_action: FrameNumberNext

Frame upon holding a direction and pressing attack. Default is 232.

Comment by YinYin:

I much prefer a positive value on the taction: myself so I don’t throw backwards when only holding up/down and pressing attack.

§throw_injury: i32

Health points the caught character loses when thrown onto the ground.

Details:

  • Sometimes, the strange value -842150451 is used here as well.
  • Without a positive throwinjury the thrown character will not damage anyone.
§throw_vx: i32

Velocity in the X Axis when the caught character is thrown.

Details:

  • Sometimes the value -842150451 is used, but it does not seem to serve any purpose.
  • For throwvx:, every value except 0 causes the caught character to get dropped. throwvy:, throwvz: and throwinjury: only work together with throwvx:.
§throw_vy: i32

Velocity in the Y Axis when the caught character is thrown.

Details:

  • Sometimes the value -842150451 is used, but it does not seem to serve any purpose.
  • For throwvx:, every value except 0 causes the caught character to get dropped. throwvy:, throwvz: and throwinjury: only work together with throwvx:.
§throw_vz: i32

Velocity in the Z Axis when the caught character is thrown.

Details:

  • Sometimes the value -842150451 is used, but it does not seem to serve any purpose.
  • For throwvx:, every value except 0 causes the caught character to get dropped. throwvy:, throwvz: and throwinjury: only work together with throwvx:.
§front_hurt_act: FrameNumberNext

Frame to switch to when caught character is hit from the front.

§back_hurt_act: FrameNumberNext

Frame to switch to when caught character is hit from the back.

Trait Implementations§

Source§

impl Clone for CPoint

Source§

fn clone(&self) -> CPoint

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CPoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CPoint

Source§

fn default() -> CPoint

Returns the “default value” for a type. Read more
Source§

impl PartialEq for CPoint

Source§

fn eq(&self, other: &CPoint) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'i> TryFrom<Pair<'i, Rule>> for CPoint

Source§

type Error = Error<'i>

The type returned in the event of a conversion error.
Source§

fn try_from(pair: Pair<'i, Rule>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for CPoint

Source§

impl Eq for CPoint

Source§

impl StructuralPartialEq for CPoint

Auto Trait Implementations§

§

impl Freeze for CPoint

§

impl RefUnwindSafe for CPoint

§

impl Send for CPoint

§

impl Sync for CPoint

§

impl Unpin for CPoint

§

impl UnwindSafe for CPoint

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.