Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
John's Energy Shield
#1
How do I make the shield stay even after when someone runs into it?
[Hope you understood what I typed :S]


I kinda feel bad that my first post is something like this X.x
[Image: tsukasa2jpg.jpg]
Reply
Thanks given by:
#2
in the hit frames, make a next: back to the shield frames. also, make the hit_a: and hit_d: tags in the shield frames 0



Azriel~
Reply
Thanks given by:
#3
Thanks, but.. doesn't that make the shield stay forever?

I do want it to.. uhh. disappear.. just not when a character hits it.. >_<
[Image: tsukasa2jpg.jpg]
Reply
Thanks given by:
#4
I once did this.

I think I opointed out a ball that reacted as if it were Johns shield and disapeared after three TU's. Then the original shield wich opointed out the fake damager used a hit_a: and a hit_d: to disapear.

But beware that this makes the character very overpowered.

Imagine two shield like this.

> C <

> and < is shields and C is the character. When he touch one shield he will continuesly keep bumping into the other shield and that will do alot of damage.

Hope you understand.

Edit: And welcome to LFE.

5 posts to go.
Age ratings for movies and games (and similar) have never been a good idea.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.
Reply
Thanks given by:
#5
then get a clean version of the john_ball.dat, copy the hit frames to somewhere else and renumber them.

in the original hit frames, make it go back to the shield frames (and possibly change pic numbers). then, make the hit_d: in the shield frames go to the renumbered hit frames.



Azriel~
Reply
Thanks given by:
#6
totaly agreeing to azriel
btw:
this method was my first thought
i always do that if i want things not to disappear :D (Yes i got secret projects [fun projects or just lil moddings] on my desktop that noone knows o_O :D)
Reply
Thanks given by:
#7
No luck with that either.. or I did it wrong >.<

I tried something though.. it works.. with little.. err.. flaws?

1> I copied all the shield frames (renumbered them of course)
2> Changed their kind to 0
3> pic: 999
4> Increased itr area
5> Added a frame which would opoint it [next frame to the original frame]

Problems..

1> Character gets hit a lot if they hit the shield from it's back
2> Sometimes (not every single time), when the char hits the shield while running.. the shield disappears [probably increasing the width would fix this..]
[Image: tsukasa2jpg.jpg]
Reply
Thanks given by:
#8
uhm, could you post your code here please? would make it more easy for us(well atleast for me) to understand what ya did^^
Reply
Thanks given by:
#9
Okay.. Sorry ^^;;


Edit: Changed to make it smaller and actually use the shield

john_ball.dat

I copied the shield frames and did this..
    DC-Code:
<frame> 70 inv_forcefield
   pic: 999  state: 3005  wait: 2  next: 71  dvx: 0  dvy: 0  centerx: 41  centery: 44  hit_a: 3 hit_d: 78  hit_j: 0
   itr:
      kind: 0  x: 41  y: 28  w: 25  h: 36  dvx: 10  vrest: 8  injury: 40   fall: 70  zwidth: 20
   itr_end:
<frame_end>
 
<frame> 71 inv_forcefield
   pic: 999  state: 3005  wait: 2  next: 72  dvx: 0  dvy: 0  centerx: 41  centery: 45  hit_a: 2  hit_d: 78  hit_j: 0
   itr:
      kind: 0  x: 36  y: 19  w: 35  h: 51  dvx: 10  vrest: 8  injury: 40   fall: 70  zwidth: 20
   itr_end:
<frame_end>
 
<frame> 72 inv_forcefield
   pic: 999  state: 3005  wait: 1  next: 73  dvx: 0  dvy: 0  centerx: 35  centery: 41  hit_a: 2  hit_d: 78  hit_j: 0
  sound: data\051.wav 
   itr:
      kind: 0  x: 28  y: 13  w: 41  h: 59  dvx: 10  vrest: 8  injury: 40   fall: 70  zwidth: 20
   itr_end:
<frame_end>
 
<frame> 73 inv_forcefield
   pic: 999  state: 3005  wait: 1  next: 74  dvx: 0  dvy: 0  centerx: 37  centery: 41  hit_a: 2  hit_d: 78  hit_j: 0
   itr:
      kind: 0  x: 33  y: 14  w: 36  h: 57  dvx: 10  vrest: 8  injury: 40   fall: 70  zwidth: 20
   itr_end:
<frame_end>
 
<frame> 74 inv_forcefield_dp
   pic: 999  state: 3005  wait: 1  next: 72  dvx: 0  dvy: 0  centerx: 37  centery: 41  hit_a: 2  hit_d: 78  hit_j: 0
   itr:
      kind: 0  x: 31  y: 12  w: 38  h: 59  dvx: 10  vrest: 8  injury: 40   fall: 70  zwidth: 20
   itr_end:
<frame_end>
 
<frame> 75 inv_forcefield
   pic: 999  state: 3005  wait: 1  next: 72  dvx: 0  dvy: 0  centerx: 37  centery: 41  hit_a: 2  hit_d: 78  hit_j: 0
   itr:
      kind: 0  x: 31  y: 12  w: 38  h: 57  dvx: 10  vrest: 8  injury: 40   fall: 70  zwidth: 20
   itr_end:
<frame_end>
 
<frame> 76 inv_forcefield_dp
  sound: data\053.wav 
   pic: 999  state: 3005  wait: 2  next: 77  dvx: 0  dvy: 0  centerx: 39  centery: 40  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 77 inv_forcefield_dp
   pic: 999  state: 3005  wait: 2  next: 78  dvx: 0  dvy: 0  centerx: 33  centery: 39  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>
 
<frame> 78 inv_forcefield_dp
   pic: 999  state: 3005  wait: 2  next: 1000  dvx: 0  dvy: 0  centerx: 33  centery: 38  hit_a: 0  hit_d: 0  hit_j: 0
<frame_end>



john.dat

Added Frame 307
    DC-Code:
<frame> 278 force_field
   pic: 168  state: 15  wait: 1  next: 307  dvx: 0  dvy: 0  dvz: 0  centerx: 22  centery: 78  hit_a: 0  hit_d: 0  hit_j: 0
   opoint:
      kind: 1  x: 73  y: 40  action: 60  dvx: 0  dvy: 0  oid: 200  facing: 0
   opoint_end:
   wpoint:
      kind: 1  x: 6  y: 54  weaponact: 20  attacking: 0  cover: 0  dvx: 0  dvy: 0  dvz: 0 
   wpoint_end:
   bdy:
      kind: 0  x: 17  y: 16  w: 39  h: 64
   bdy_end:
<frame_end>
 
<frame> 307 force_field
   pic: 168  state: 15  wait: 1  next: 279  dvx: 0  dvy: 0  dvz: 0  centerx: 22  centery: 78  hit_a: 0  hit_d: 0  hit_j: 0
   opoint:
      kind: 1  x: 73  y: 40  action: 70  dvx: 0  dvy: 0  oid: 200  facing: 0
   opoint_end:
   wpoint:
      kind: 1  x: 6  y: 54  weaponact: 20  attacking: 0  cover: 0  dvx: 0  dvy: 0  dvz: 0 
   wpoint_end:
   bdy:
      kind: 0  x: 17  y: 16  w: 39  h: 64
   bdy_end:
<frame_end>


Forgot to mention zwidth and state:3005 earlier ^^;;

Louis can walk past.. since he doesn't fall..


Attached Files
.rar   John.rar (Size: 26.43 KB / Downloads: 262)
[Image: tsukasa2jpg.jpg]
Reply
Thanks given by:
#10
I don't know what is wrong in your code but I do exactly what Azriel has suggested and I found no bug (if you don't count can't rebound your own ball is a bug).

And for the more-hit-than-usual bug, change the vrest to higher value.


Attached Files
.rar   john_ball.rar (Size: 5.38 KB / Downloads: 167)
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)