Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Object following a char on y-axis
#1
While learning today I could think of a method how to make an object follow a char on y-axis. Basic idea is the following:

- you add a bdy @ y: 1000 with h: 5 in every frame of the char
- the t3 object has ik8 in every frame - some ik8 make the t3 stay at the same frame, if some other ik8 are activated you go to a frame with a higher centery - the object move on y-axis
- the ik8-areas are changed in the frame, you have to add the same value you added to centery in comparision to the first frame
- be careful with the limits - 9 or 10 itrs in each frame seem to crash the game - so i had a closer look and recognized the char don`t move more then 20px / second on y-axis, so only 5 ik8 oer frame are needed max, two examples:
1. centery: 0 - ik8 @ y: "0" "+10" "+20"
2. centery: 40 - ik8 @ "40-20" "40-10" "40" "40 + 10" "40 + 20"
better have alook yourself to get it

last thing: the example has changes of center-point every 10 px - makes the whole technique a bit rough, but I can imagine that with centery-changes every 5 px and with 7 ik8 in every frame this will work quite well :p

Not sure if I explained it in a good way, doubt that :p


Attached Files
.zip   Davis.zip (Size: 35.63 KB / Downloads: 137)
[Image: random.php?pic=random]
www.lf-empire.de
Once I had a fortune, it said: "Leave now. Life is short. Time is luck"
Don't dream your life, live your dream!
Reply
Thanks given by:
#2
May a solution for minor Y-axis changes, but can't work for a whole char since there is the 10-itr limit per frame. If you would really want to cover the entire bandwith you would need... may 100 itr's (bandwith of y=500) in 10 frames, being run with wait:1 (due to y>small) resulting in every height just getting checked once every 20 fps or so...

Sure, better then no y-axis-movement, but not THAT a great solution...

And if you just use the 7 itr's you mentioned it would 1st limit the possibility of combo moves (these require about 3-5 itr's) and 2nd won't work if the char jumps above 20 px high (and they usul jump ~250 or something).
My Creations: (Click to View)

Return (String) System.getNewsOfTheDay();
Barely active, expect slow responses. If at all.


Greetz,
Alblaka
Reply
Thanks given by:
#3
nah, not correct.

First of all: to start this press D>A, forgot this.

For your problem alblaka - actually the fact that the char can`t move that fast on y-asix you don`t need all the itrs, like if your system go from y: 0 to y: -100 - the char won`t jump from 0 to -100 in 1TU and that`s the reaction time of the ik8 - so you don`t need them all in every frame - that`s why you have to find a balance between the number of different steps (my steps are 10px each, will work on better ones later) and number of ik8 in a frame - which limits the whole thing.

I`ll go work on an update now, hope it`ll be better - the first one was just to save the rough idea :p

EDIT: @Alblaka - where do you know if you didnt try - the download counter is 0 :p
[Image: random.php?pic=random]
www.lf-empire.de
Once I had a fortune, it said: "Leave now. Life is short. Time is luck"
Don't dream your life, live your dream!
Reply
Thanks given by:
#4
and why did you repost this thread again? you could have updated your old one
http://www.lf-empire.de/forum/showthread.php?tid=2139

:P

and lol, download counter on 0, seems nobody is interested atall, still pretty good idea, but I prefere hex editing

@down
still, ninja'ed, mwhahahaha
Reply
Thanks given by:
#5
Though, still, itrk: 8 sucks, because it may interact with other people then. Well, you know...
But yea, MH, nice tutorial, so would you mind to move this thread there, and maybe add it to the mainsite? ;D

TheNave, I downloaded it.
Reply
Thanks given by:
#6
omg, somehow I`m really to old I think - forgot about my first thread.

Nave, do you have a good hex solution for this? saves me some time - I tried this code:

Code:
<frame> 100 experiment
   pic: 9  state: 3005  wait: 1  next: 100  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 0
   itr:   #15   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 103  injury: 0 zwidth: 500  itr_end:
   itr:   #10   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 102  injury: 0 zwidth: 500  itr_end:
   itr:   #5    kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 101  injury: 0 zwidth: 500  itr_end:
   itr:   #0    kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 100  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 101 experiment + 5
   pic: 9  state: 3005  wait: 1  next: 101  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 5
   itr:   #20   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 104  injury: 0 zwidth: 500  itr_end:
   itr:   #15   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 103  injury: 0 zwidth: 500  itr_end:
   itr:   #10   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 102  injury: 0 zwidth: 500  itr_end:
   itr:   #5    kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 101  injury: 0 zwidth: 500  itr_end:
   itr:   #0    kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 100  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 102 experiment + 10
   pic: 9  state: 3005  wait: 1  next: 102  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 10
   itr:   #25   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 105  injury: 0 zwidth: 500  itr_end:
   itr:   #20   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 104  injury: 0 zwidth: 500  itr_end:
   itr:   #15   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 103  injury: 0 zwidth: 500  itr_end:
   itr:   #10   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 102  injury: 0 zwidth: 500  itr_end:
   itr:   #5    kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 101  injury: 0 zwidth: 500  itr_end:
   itr:   #0    kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 100  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 103 experiment + 15
   pic: 9  state: 3005  wait: 1  next: 103  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 15
   itr:   #30   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 106  injury: 0 zwidth: 500  itr_end:
   itr:   #25   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 105  injury: 0 zwidth: 500  itr_end:
   itr:   #20   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 104  injury: 0 zwidth: 500  itr_end:
   itr:   #15   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 103  injury: 0 zwidth: 500  itr_end:
   itr:   #10   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 102  injury: 0 zwidth: 500  itr_end:
   itr:   #5    kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 101  injury: 0 zwidth: 500  itr_end:
   itr:   #0    kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 100  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 104 experiment + 20
   pic: 9  state: 3005  wait: 1  next: 104  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 20
   itr:   #35   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 107  injury: 0 zwidth: 500  itr_end:
   itr:   #30   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 106  injury: 0 zwidth: 500  itr_end:
   itr:   #25   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 105  injury: 0 zwidth: 500  itr_end:
   itr:   #20   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 104  injury: 0 zwidth: 500  itr_end:
   itr:   #15   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 103  injury: 0 zwidth: 500  itr_end:
   itr:   #10   kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 102  injury: 0 zwidth: 500  itr_end:
   itr:   #5    kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 101  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 105 experiment + 25
   pic: 9  state: 3005  wait: 1  next: 105  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 25
   itr:   #40   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 108  injury: 0 zwidth: 500  itr_end:
   itr:   #35   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 107  injury: 0 zwidth: 500  itr_end:
   itr:   #30   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 106  injury: 0 zwidth: 500  itr_end:
   itr:   #25   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 105  injury: 0 zwidth: 500  itr_end:
   itr:   #20   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 104  injury: 0 zwidth: 500  itr_end:
   itr:   #15   kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 103  injury: 0 zwidth: 500  itr_end:
   itr:   #10   kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 102  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 106 experiment + 30
   pic: 9  state: 3005  wait: 1  next: 106  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 30
   itr:   #45   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 109  injury: 0 zwidth: 500  itr_end:
   itr:   #40   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 108  injury: 0 zwidth: 500  itr_end:
   itr:   #35   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 107  injury: 0 zwidth: 500  itr_end:
   itr:   #30   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 106  injury: 0 zwidth: 500  itr_end:
   itr:   #25   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 105  injury: 0 zwidth: 500  itr_end:
   itr:   #20   kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 104  injury: 0 zwidth: 500  itr_end:
   itr:   #15   kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 103  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 107 experiment + 35
   pic: 9  state: 3005  wait: 1  next: 107  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 35
   itr:   #50   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 110  injury: 0 zwidth: 500  itr_end:
   itr:   #45   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 109  injury: 0 zwidth: 500  itr_end:
   itr:   #40   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 108  injury: 0 zwidth: 500  itr_end:
   itr:   #35   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 107  injury: 0 zwidth: 500  itr_end:
   itr:   #30   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 106  injury: 0 zwidth: 500  itr_end:
   itr:   #25   kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 105  injury: 0 zwidth: 500  itr_end:
   itr:   #20   kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 104  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 108 experiment + 40
   pic: 9  state: 3005  wait: 1  next: 108  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 40
   itr:   #55   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 111  injury: 0 zwidth: 500  itr_end:
   itr:   #50   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 110  injury: 0 zwidth: 500  itr_end:
   itr:   #45   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 109  injury: 0 zwidth: 500  itr_end:
   itr:   #40   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 108  injury: 0 zwidth: 500  itr_end:
   itr:   #35   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 107  injury: 0 zwidth: 500  itr_end:
   itr:   #30   kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 106  injury: 0 zwidth: 500  itr_end:
   itr:   #25   kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 105  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 109 experiment + 45
   pic: 9  state: 3005  wait: 1  next: 109  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 45
   itr:   #60   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 112  injury: 0 zwidth: 500  itr_end:
   itr:   #55   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 111  injury: 0 zwidth: 500  itr_end:
   itr:   #50   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 110  injury: 0 zwidth: 500  itr_end:
   itr:   #45   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 109  injury: 0 zwidth: 500  itr_end:
   itr:   #40   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 108  injury: 0 zwidth: 500  itr_end:
   itr:   #35   kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 107  injury: 0 zwidth: 500  itr_end:
   itr:   #30   kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 106  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 110 experiment + 50
   pic: 9  state: 3005  wait: 1  next: 110  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 50
   itr:   #65   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 113  injury: 0 zwidth: 500  itr_end:
   itr:   #60   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 112  injury: 0 zwidth: 500  itr_end:
   itr:   #55   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 111  injury: 0 zwidth: 500  itr_end:
   itr:   #50   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 110  injury: 0 zwidth: 500  itr_end:
   itr:   #45   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 109  injury: 0 zwidth: 500  itr_end:
   itr:   #40   kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 108  injury: 0 zwidth: 500  itr_end:
   itr:   #35   kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 107  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 111 experiment + 55
   pic: 9  state: 3005  wait: 1  next: 111  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 55
   itr:   #70   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 114  injury: 0 zwidth: 500  itr_end:
   itr:   #65   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 113  injury: 0 zwidth: 500  itr_end:
   itr:   #60   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 112  injury: 0 zwidth: 500  itr_end:
   itr:   #55   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 111  injury: 0 zwidth: 500  itr_end:
   itr:   #50   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 110  injury: 0 zwidth: 500  itr_end:
   itr:   #45   kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 109  injury: 0 zwidth: 500  itr_end:
   itr:   #40   kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 108  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 112 experiment + 60
   pic: 9  state: 3005  wait: 1  next: 112  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 60
   itr:   #75   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 115  injury: 0 zwidth: 500  itr_end:
   itr:   #70   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 114  injury: 0 zwidth: 500  itr_end:
   itr:   #65   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 113  injury: 0 zwidth: 500  itr_end:
   itr:   #60   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 112  injury: 0 zwidth: 500  itr_end:
   itr:   #55   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 111  injury: 0 zwidth: 500  itr_end:
   itr:   #50   kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 110  injury: 0 zwidth: 500  itr_end:
   itr:   #45   kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 109  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 113 experiment + 65
   pic: 9  state: 3005  wait: 1  next: 113  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 65
   itr:   #80   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 116  injury: 0 zwidth: 500  itr_end:
   itr:   #75   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 115  injury: 0 zwidth: 500  itr_end:
   itr:   #70   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 114  injury: 0 zwidth: 500  itr_end:
   itr:   #65   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 113  injury: 0 zwidth: 500  itr_end:
   itr:   #60   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 112  injury: 0 zwidth: 500  itr_end:
   itr:   #55   kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 111  injury: 0 zwidth: 500  itr_end:
   itr:   #50   kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 110  injury: 0 zwidth: 500  itr_end:
<frame_end>
<frame> 114 experiment + 70
   pic: 9  state: 3005  wait: 1  next: 114  dvx: 0  dvy: 0  dvz: 0  centerx: 55  centery: 70
   itr:   #85   kind: 8  x: -500  y:  985  w: 1000  h: 5  dvx: 117  injury: 0 zwidth: 500  itr_end:
   itr:   #80   kind: 8  x: -500  y:  990  w: 1000  h: 5  dvx: 116  injury: 0 zwidth: 500  itr_end:
   itr:   #75   kind: 8  x: -500  y:  995  w: 1000  h: 5  dvx: 115  injury: 0 zwidth: 500  itr_end:
   itr:   #70   kind: 8  x: -500  y: 1000  w: 1000  h: 5  dvx: 114  injury: 0 zwidth: 500  itr_end:
   itr:   #65   kind: 8  x: -500  y: 1005  w: 1000  h: 5  dvx: 113  injury: 0 zwidth: 500  itr_end:
   itr:   #60   kind: 8  x: -500  y: 1010  w: 1000  h: 5  dvx: 112  injury: 0 zwidth: 500  itr_end:
   itr:   #55   kind: 8  x: -500  y: 1015  w: 1000  h: 5  dvx: 111  injury: 0 zwidth: 500  itr_end:
<frame_end>

way more detailed and stuff and what? game crashed - with s itrs!!! THats not much, I guess there`re some other limits...

EDIT: tryed to explore and the result? Probably biggest fail since a while :p Should go back and teach noobs about itr kind 0 and how to spawn 10k balls with one opoint :p
[Image: random.php?pic=random]
www.lf-empire.de
Once I had a fortune, it said: "Leave now. Life is short. Time is luck"
Don't dream your life, live your dream!
Reply
Thanks given by:
#7
hex solution?
easy stuff is awefully easy, done in 5 mins, bugfree and perfect working :P

I can make custom ik8's work on certain type, id and/or team and can make it follow x, y and/or z-axis

f.e. I can make a ik8 which does only follow id 11(davis) who's in your team and moves on x, y and z axis...
Reply
Thanks given by:
#8
this rocks, I might come back on you for this...
[Image: random.php?pic=random]
www.lf-empire.de
Once I had a fortune, it said: "Leave now. Life is short. Time is luck"
Don't dream your life, live your dream!
Reply
Thanks given by:
#9
Aww, come on... this was a thread in DC section, you just can't easyly use a HEX solution (otherwise i would have recommended the DLL Framework... there's a bunch of new special itr/kind8's)... no fair >:(
My Creations: (Click to View)

Return (String) System.getNewsOfTheDay();
Barely active, expect slow responses. If at all.


Greetz,
Alblaka
Reply
Thanks given by:
#10
Whar whar whar, hex wins against dc :P
but hey, why doing it the easy way when you can also go the pretty damn complicated bugged way?
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)