08-27-2013, 10:18 AM
Today we will go to an important lesson which is really useful when you start modifying moves or create new ones.
But first we will learn about type 3 objects. These are "balls" or "magic attacks", like dennis balls (D>A).
Bmp part is the same thing with chars, the only difference is that here are no "parameters" like running speed. Frames are build in the same way etc. Usually when a ball is flying, those frames are called flying frames. open davis ball and look on it.
Flying frames (you can change frame names) has some itr's and some bdy's and use state: 3000. You can use other states but this is the one that we will learn first.
When you make frames in state 3000, ball goes in frame 10 (hitting) if you touch a character (or a heavy weapon). But if it hits another ball (or a light weapon) it goes to frame 20 (hitting). Rebounding starts on frame 30. USE STARE 3001 ON HITTING FRAMES AND 3002 ON HIT FRAMES.
You can see that balls like davis or dennis has hit and hitting frames ending with a next: 1000 which means balls will disappear.
The second part is oponit tag. this is used to spawn objects from objects, just like woody shoots that balls.
Lets' take an example of opoint and then explain. From davis:
kind: 1 use 1 for normal spawn.
x and y are coordinates, the place where the object (char) will spawn the ball or whatever object it is.
action: 0 the frame where the ball (object) will appear
dvx: how much it will be thrown in x (horizontal) direction
dvy: same thing, just for y direction
oid: 207 this is very important, this shows which id it will spawn. in this case it will spawn object with id 207, which is davis_ball.dat (read data.txt). (oid maybe means "opoint id").
facing: 0 means it will go in the char's directon. if it is 1 in the opposite direction. if you see facing: 30, means it will spawn 3 objects, if 31 in the other direction.
HOW REBOUND IS MADE
just by adding an opoint with facing: 1 of the same ball. Look on some rebounds.
Homework
make firen spawn john's disc when he press D>A (instead of fire balls).
2 rules to remember
opoint dont work on the first frame (of an action)
there cant be more than one opoint in a frame (just like other points)
But first we will learn about type 3 objects. These are "balls" or "magic attacks", like dennis balls (D>A).
Bmp part is the same thing with chars, the only difference is that here are no "parameters" like running speed. Frames are build in the same way etc. Usually when a ball is flying, those frames are called flying frames. open davis ball and look on it.
Flying frames (you can change frame names) has some itr's and some bdy's and use state: 3000. You can use other states but this is the one that we will learn first.
When you make frames in state 3000, ball goes in frame 10 (hitting) if you touch a character (or a heavy weapon). But if it hits another ball (or a light weapon) it goes to frame 20 (hitting). Rebounding starts on frame 30. USE STARE 3001 ON HITTING FRAMES AND 3002 ON HIT FRAMES.
You can see that balls like davis or dennis has hit and hitting frames ending with a next: 1000 which means balls will disappear.
The second part is oponit tag. this is used to spawn objects from objects, just like woody shoots that balls.
Lets' take an example of opoint and then explain. From davis:
DC-Code:
<frame> 244 ball1 pic: 144 state: 3 wait: 1 next: 246 dvx: 0 dvy: 0 dvz: 0 centerx: 30 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0 opoint: kind: 1 x: 90 y: 43 action: 0 dvx: 0 dvy: 0 oid: 207 facing: 0 opoint_end: wpoint: kind: 1 x: 30 y: 50 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0 wpoint_end: bdy: kind: 0 x: 21 y: 18 w: 43 h: 62 bdy_end: <frame_end> |
DC-Code:
opoint: kind: 1 x: 90 y: 43 action: 0 dvx: 0 dvy: 0 oid: 207 facing: 0 opoint_end: |
kind: 1 use 1 for normal spawn.
x and y are coordinates, the place where the object (char) will spawn the ball or whatever object it is.
action: 0 the frame where the ball (object) will appear
dvx: how much it will be thrown in x (horizontal) direction
dvy: same thing, just for y direction
oid: 207 this is very important, this shows which id it will spawn. in this case it will spawn object with id 207, which is davis_ball.dat (read data.txt). (oid maybe means "opoint id").
facing: 0 means it will go in the char's directon. if it is 1 in the opposite direction. if you see facing: 30, means it will spawn 3 objects, if 31 in the other direction.
HOW REBOUND IS MADE
just by adding an opoint with facing: 1 of the same ball. Look on some rebounds.
Homework
make firen spawn john's disc when he press D>A (instead of fire balls).
2 rules to remember
opoint dont work on the first frame (of an action)
there cant be more than one opoint in a frame (just like other points)