Flash in an cannon-attack - DarkFirzenEX - 04-15-2009
Hi Guys
For my char DarkFirzenEX, I tried to make an attack like julians col.
It should look like this:
But when I use the attack in game, the Attack spawns many pixels down from the position where my char standed.
Here the code from the attack data. (Julains col as a base)
Code: <frame> 40 col
pic: 0 state: 15 wait: 3 next: 41 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
sound: data\089.wav
itr:
kind: 0 x: 10 y: 0 w: 867 h: 273 dvx: -20 dvy: -25 fall: 70 vrest: 30 bdefend: 100 injury: 100 zwidth: 37
effect: 22
itr_end:
<frame_end>
<frame> 41 col
pic: 1 state: 15 wait: 1 next: 42 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
sound: data\071.wav
opoint:
kind: 1 x: 95 y: 43 action: 0 dvx: 0 dvy: 0 oid: 667 facing: 0
opoint_end:
itr:
kind: 0 x: 10 y: 0 w: 867 h: 273 dvx: -20 dvy: -25 fall: 70 vrest: 30 bdefend: 100 injury: 100 zwidth: 37
effect: 3
itr_end:
<frame_end>
<frame> 42 col
pic: 2 state: 15 wait: 5 next: 43 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
itr:
kind: 0 x: 10 y: 0 w: 867 h: 273 dvx: -20 dvy: -25 fall: 70 vrest: 30 bdefend: 100 injury: 100 zwidth: 37
effect: 22
itr_end:
<frame_end>
<frame> 43 col
pic: 3 state: 15 wait: 5 next: 44 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
opoint:
kind: 1 x: 95 y: 43 action: 0 dvx: 0 dvy: 0 oid: 667 ----(This oid is for a white flash which appears every second frame.. ignore it :P)---- facing: 0
opoint_end:
itr:
kind: 0 x: 10 y: 0 w: 867 h: 273 dvx: -20 dvy: -25 fall: 70 vrest: 30 bdefend: 100 injury: 100 zwidth: 37
effect: 3
itr_end:
<frame_end>
<frame> 44 col
pic: 4 state: 15 wait: 5 next: 45 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
itr:
kind: 0 x: 10 y: 0 w: 867 h: 273 dvx: -20 dvy: -25 fall: 70 vrest: 30 bdefend: 100 injury: 100 zwidth: 37
effect: 22
itr_end:
<frame_end>
<frame> 45 col
pic: 3 state: 15 wait: 5 next: 46 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
opoint:
kind: 1 x: 95 y: 43 action: 0 dvx: 0 dvy: 0 oid: 667 facing: 0
opoint_end:
itr:
kind: 0 x: 10 y: 0 w: 867 h: 273 dvx: -20 dvy: -25 fall: 70 vrest: 30 bdefend: 100 injury: 100 zwidth: 37
effect: 3
itr_end:
<frame_end>
<frame> 46 col
pic: 4 state: 15 wait: 5 next: 47 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
itr:
kind: 0 x: 10 y: 0 w: 867 h: 273 dvx: -20 dvy: -25 fall: 70 vrest: 30 bdefend: 100 injury: 100 zwidth: 37
effect: 22
itr_end:
<frame_end>
<frame> 47 col
pic: 3 state: 15 wait: 0 next: 48 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
opoint:
kind: 1 x: 95 y: 43 action: 0 dvx: 0 dvy: 0 oid: 667 facing: 0
opoint_end:
itr:
kind: 0 x: 10 y: 0 w: 867 h: 273 dvx: -20 dvy: -25 fall: 70 vrest: 30 bdefend: 100 injury: 100 zwidth: 37
effect: 3
itr_end:
<frame_end>
<frame> 48 col
pic: 4 state: 15 wait: 1 next: 49 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
<frame_end>
<frame> 49 col
pic: 5 state: 15 wait: 0 next: 50 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
<frame_end>
<frame> 50 col
pic: 5 state: 15 wait: 0 next: 51 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
<frame_end>
<frame> 51 col
pic: 6 state: 15 wait: 0 next: 1000 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
<frame_end>
And the code where the attack is in DarkFirzenEX's data.
Code: <frame> 310 explosion
pic: 107 state: 3 wait: 1 next: 311 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0 mp: 100
sound: data\018.wav
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 311 explosion
pic: 108 state: 3 wait: 0 next: 312 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
sound: data\018.wav
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 312 explosion
pic: 107 state: 3 wait: 1 next: 313 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 313 explosion
pic: 108 state: 3 wait: 0 next: 314 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
sound: data\018.wav
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 314 explosion
pic: 109 state: 3 wait: 1 next: 315 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 315 explosion
pic: 108 state: 3 wait: 0 next: 316 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
sound: data\018.wav
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 316 explosion
pic: 109 state: 3 wait: 1 next: 317 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 317 explosion
pic: 108 state: 3 wait: 0 next: 318 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
sound: data\018.wav
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 318 explosion
pic: 110 state: 3 wait: 8 next: 319 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
opoint:
kind: 1 x: 40 y: 79 action: 40 dvx: 0 dvy: 0 oid: 666 facing: 0
opoint_end:
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 319 explosion
pic: 110 state: 3 wait: 7 next: 320 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 320 explosion
pic: 110 state: 3 wait: 7 next: 321 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 321 explosion
pic: 111 state: 3 wait: 2 next: 322 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
<frame> 322 explosion
pic: 112 state: 3 wait: 2 next: 999 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 79 hit_a: 0 hit_d: 0 hit_j: 0
wpoint:
kind: 1 x: 35 y: 62 weaponact: 30 attacking: 0 cover: 1 dvx: 0 dvy: 0 dvz: 0
wpoint_end:
bdy:
kind: 0 x: 15 y: 27 w: 70 h: 71
bdy_end:
<frame_end>
Im not good a DC'ind and I really dunno why this is. Pls help!
RE: Attack spawns at the wrong point.. why? - Silverthorn - 04-15-2009
DC-Code:
opoint:
kind: 1 x: 40 y: 79 action: 40 dvx: 0 dvy: 0 oid: 666 facing: 0
opoint_end:
|
Hmm, this would mean, the origin of the attack will be directly on the ground. I'd suggest it at the height of the fist (which should be around y: 40). Also, the x-value should be around 80, so that it'll really originate at the fist.
DC-Code:
<frame> 40 col
pic: 0 state: 15 wait: 3 next: 41 dvx: 0 dvy: 0 dvz: 0 centerx: 190 centery: 120 hit_a: 0 hit_d: 0 hit_j: 0
sound: data\089.wav
itr:
kind: 0 x: 10 y: 0 w: 867 h: 273 dvx: -20 dvy: -25 fall: 70 vrest: 30 bdefend: 100 injury: 100 zwidth: 37
effect: 22
itr_end:
<frame_end>
|
Make the centerx 0. I'm not quite sure about the exact centery-value but it should be half of the beam's height (which should be something close to 80).
RE: Attack spawns at the wrong point.. why? - DarkFirzenEX - 04-16-2009
Whoo, thanx
Now it spawns at the right point.. what an easy error!
your x- and y-values were not wright, but that's because I made the sprites a little bit weird.
I tried a few times and the it worked!
Ok now a new question.
I want to make a white flash over the whole field every second frame.
My idea was making a ball which is in the first frame invisible and in the second frame evry big and white (so it flashes.)
But i think my version is not the easyiest. And since I solved the problem above, the flash doesnt work anymore.
Has anyone an idea?
(If these are questions which i shouldnt ask in forum, because they are too easy.. pls say me)
RE: Flash in an cannon-attack - Drahcir - 04-16-2009
Make a type:3 ball with an EPIC sized sprite, state:9997, hit_j:99 or 1 (whichever one works), dvy:550, wait:1, and next:1000 and opoint it every second frame.
If you dont want to make a 1-frame data file, put the frame mentioned above inside the ball attack data.
RE: Flash in an cannon-attack - Silverthorn - 04-17-2009
^eh, no idea about the correct hit_j-value? Same here =P
Anyways, a t3-object would probably the best thing to use here. In the bmp-part, add a really large sprite (be careful, LF2 sometimes doesn't like those and crashes) (something around 5000x500px). Just be sure to use the correct w/h-values, if you don't, the sprite sometimes disappears. In this case: smaller than actual values are better than greater values.
Now, in the t3-file, as it is only a a few frames, I'd recommend to put it into some already-in-use dat-file. I'm sure you have made an attack with a t3-file already. Just put in this code:
DC-Code:
<frame> 100 flash_preparation
pic: 999 state: 3005 wait: 3 next: 101 dvx: 0 dvy: 0 dvz: 0 centerx: 2500 centery: 500 hit_a: 0 hit_j: 99 hit_d: 0
<frame_end>
<frame> 101 poof
pic: xyz state: 3005 wait: 0 next: 102 dvx: 0 dvy: 0 dvz: 0 centerx: 2500 centery: 500 hit_a: 2 hit_j: 0 hit_d: 103
<frame_end>
<frame> 102 poof_invisible
pic: 999 state: 3005 wait: 2 next: 101 dvx: 0 dvy: 0 dvz: 0 centerx: 2500 centery: 500 hit_a: 2 hit_j: 0 hit_d: 103
<frame_end>
<frame> 103 remove
pic: 999 state: 3005 wait: 0 next: 1000 dvx: 0 dvy: 0 dvz: 0 centerx: 2500 centery: 500 hit_a: 0 hit_j: 0 hit_d: 0
<frame_end>
|
This should last 255 TUs without doing anything but flashing every two TUs. In case you want to read about these special tags, click >here<.
Now, just add an opoint in your character's frame. It should look like this:
DC-Code:
opoint:
kind: 1 x: 39 y: 79 action: 100 dvx: 0 dvy: 0 dvz: 0 oid: xyz facing: 0
opoint_end:
|
And that should be it. I think. And I hope. This is the easy way, Drahcir's is doable, too, but I don't like opointing the same object over and over again. I just don't like it :P
|