Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] Shoot balls that only go straight.
#1
? 
Hi guys, new to the forum and i have a question i can't solve on my own and i can't find the answer here (I did go through quite a few threads, but if the question's already been asked and i missed it, i apologize in advance :().

I'm trying to create an ice ball that doesn't fly; just stay in wherever it's casted, destroy itself on hit, and dissipate itself overtime. I got all that to work, but the thing is, player can make it go up or down when casting (just like shooting normal balls). I'm currently using state:3000. I tried some other states but it doesn't behave quite correctly. I think the closest thing to my ball is firzen's ball and bat's laser, which can only shoot straight. But they also use state 3000. So im stuck. Any ideas? Thanks! :s



Reply
Thanks given by:
#2
That Firzen's ball and Bat's laser can only be cast straight is id-hardcoded, I believe.

In the frames of your ice ball (especially the first frame it's being created in), try using hit_j: 50. hit_j controls movement on the z-axis for type 3 objects, and 50 is the value for no z movement.

Welcome to LFE btw!
Quote of the Day f***ing Year (Click to View)
The meme is real (Click to View)
Reply
Thanks given by:
#3
(01-17-2014, 10:22 AM)Ramond Wrote:  That Firzen's ball and Bat's laser can only be cast straight is id-hardcoded, I believe.

In the frames of your ice ball (especially the first frame it's being created in), try using hit_j: 50. hit_j controls movement on the z-axis for type 3 objects, and 50 is the value for no z movement.

Welcome to LFE btw!

Thanks! I'll prolly be posting more questions in the future if that's ok :D

Hmm... It isn't working. I can still move it up or down. I put hit_j: 50 in my first 5 frames of ice ball. Here's the first 3:

<frame> 210 flying
pic: 0 state: 3000 wait: 2 next: 211 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 41 hit_a: 0 hit_d: 0 hit_j: 50
itr:
kind: 0 x: 22 y: 27 w: 55 h: 27 dvx: 7 fall: 20 vrest: 10 bdefend: 16 injury: 45
effect: 3
itr_end:
bdy:
kind: 0 x: 22 y: 27 w: 55 h: 27
bdy_end:
<frame_end>

<frame> 211 flying
pic: 1 state: 3000 wait: 2 next: 212 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 41 hit_a: 0 hit_d: 0 hit_j: 50
itr:
kind: 0 x: 22 y: 27 w: 55 h: 27 dvx: 7 fall: 20 vrest: 10 bdefend: 16 injury: 45
effect: 3
itr_end:
bdy:
kind: 0 x: 22 y: 27 w: 55 h: 27
bdy_end:
<frame_end>

<frame> 212 flying
pic: 2 state: 3000 wait: 2 next: 213 dvx: 0 dvy: 0 dvz: 0 centerx: 40 centery: 41 hit_a: 0 hit_d: 0 hit_j: 50
itr:
kind: 0 x: 22 y: 27 w: 55 h: 27 dvx: 7 fall: 20 vrest: 10 bdefend: 16 injury: 45
effect: 3
itr_end:
bdy:
kind: 0 x: 22 y: 27 w: 55 h: 27
bdy_end:
<frame_end>

Maybe something else I'm doing wrong?

Reply
Thanks given by:
#4
(01-17-2014, 10:22 AM)Ramond Wrote:  In the frames of your ice ball (especially the first frame it's being created in), try using hit_j: 50. hit_j controls movement on the z-axis for type 3 objects, and 50 is the value for no z movement.
hit_j: doesn't work, as can be seen with Davis balls.
Instead dvz: 550 works, if I recall correctly.
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
(01-17-2014, 11:52 AM)Someone else Wrote:  
(01-17-2014, 10:22 AM)Ramond Wrote:  In the frames of your ice ball (especially the first frame it's being created in), try using hit_j: 50. hit_j controls movement on the z-axis for type 3 objects, and 50 is the value for no z movement.
hit_j: doesn't work, as can be seen with Davis balls.
Instead dvz: 550 works, if I recall correctly.

Thanks for the reply, but no luck. I can still move it up and down. Do i need to put it in every frame? coz I just put it in the first few and didn't work.
Reply
Thanks given by:
#6
dvz: 550 definitely works. Show us your opoint and the first frame, inside dc tags please:

    DC-Code:
awesome stuff really
opoint: oid: 210 action: 125
<frame> 125 things
dvz: 550
Reply
Thanks given by:
#7
(01-17-2014, 12:22 PM)YinYin Wrote:  dvz: 550 definitely works. Show us your opoint and the first frame, inside dc tags please:

    DC-Code:
awesome stuff really
opoint: oid: 210 action: 125
<frame> 125 things
dvz: 550

Aww, n/m! I accidentally put the dvz: 550 under itr. It works now, One thing i notice though, is that it'll still moves slightly and then stop. But making the first frame wait:0 solved that. Thanks guys.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)