I think almost everybody has played Rayman at least once - if the character stands for a while, he starts playing with parts of his body. You can also create such an effect in LF2. Earlier, I used itr/kind 3, state 18, and cpoint for this, but there's a much easier solution with itr/kind 8!
First, you modify the standing frames: in frame 1, you activate a ball with opoint, then you send the character into a loop of standing frames (in the example it's 350-353). In these frames you add a bdy at y: 1000 to activate the Rayman Effect and a itr/kind 8 at y: 2000 to start this effect.
Now lets look at the ball you activated:
<frame> 100 raymon-effect
pic: 1000 state: 3005 wait: 30 next: 101 dvx: 550 dvy: 550
dvz: 550 centerx: 0 centery: 0 hit_a: 0 hit_d: 0 hit_j: 0
<frame_end>
<frame> 101 raymon-effect
pic: 1000 state: 3005 wait: 1 next: 1000 dvx: 550 dvy: 550
dvz: 550 centerx: 0 centery: 0 hit_a: 0 hit_d: 0 hit_j: 0
itr: #raymon akt
kind: 8 x: -5 y: 1000 w: 10 h: 10 dvx: 102 injury: 0
itr_end:
<frame_end>
<frame> 102 raymon-effect
pic: 1000 state: 3005 wait: 1 next: 103 dvx: 550 dvy: 550
dvz: 550 centerx: 0 centery: 0 hit_a: 0 hit_d: 0 hit_j: 0
<frame_end>
<frame> 103 raymon-effect
pic: 1000 state: 3005 wait: 1 next: 1000 dvx: 550 dvy: 550
dvz: 550 centerx: 0 centery: 0 hit_a: 0 hit_d: 0 hit_j: 0
opoint: #raymon start
kind: 1 x: 0 y: 0 action: 354 dvx: 0 dvy: 0 oid: 11 facing: 0
opoint_end:
<frame_end>
In the first frame you just note the time the character should wait until the effect starts. In the second frame, the ball checks to see if the character is still there (y: 1000) or if he has moved. If he's still there, the itr/kind 8 will hit his bdy and frame 102 will be activated (noted in dvx). If the character moves, the ball disappears. Frame 102 is just a transition frame leading to frame 103, where a character frame is activated:
<frame> 354 raymon-starter
pic: 1000 state: 3005 wait: 1 next: 1000 dvx: 0 dvy: 0
dvz: 0 centerx: 0 centery: 0 hit_a: 0 hit_d: 0 hit_j: 0
bdy: #raymon start
kind: 0 x: -5 y: 2000 w: 10 h: 10
bdy_end:
<frame_end>
Because itr/kind 8 only reacts to bdy's in type0-files, this is necessary. But if you activate a character instead of a ball, you'll usually see a "Com" subtitle appear. This frame ensures that the character's itr/kind: 8 hits something and goes to the frame noted by the dvx tag - that's the Rayman-Effect. In the study example I just linked it to the Many Punch Attack.
Rayman Effect |
Inspired by MH-Razen