Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Fireball travel
Old
Malqua
Guest
 
Status:
Posts: n/a
Default Fireball travel - 08-20-2010, 02:00 PM

Would it be possible to have a fireball continuously moving -until- it hits the enemy, then disappears?

The way I have it now is that the fireball will move forward 10 meters and then disappear. I also have the enemy detecting whether the fireball is within 5 meters of it to take damage. However, this only works when the fireball -stops moving- within the 5 meters. If I'm right up next to the enemy, the fireball will go through him and continue the 10 meters, and not hurt the enemy.

How can I fix this so that if the fireball hits the enemy it will stop moving, or if it doesn't hit it will continue the 10 meters?
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 08-20-2010, 03:14 PM

Yup, reduce the amount it moves to something very small, like .01 meters, and reduce the duration to zero seconds.
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 08-20-2010, 05:12 PM

Yeah, what he said. Check for a collision every one of those 0.1 meters.


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Old
Malqua
Guest
 
Status:
Posts: n/a
Default 08-25-2010, 04:06 PM

I'm not entirely sure how to do all that. I have it set to move .1 meters now, but I don't know how to get it to keep going until it hits my enemy.
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 08-25-2010, 04:28 PM

Make it so it moves, then if it's touching the enemy, it goes back to its original position, but if not, it does it again.


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Old
Malqua
Guest
 
Status:
Posts: n/a
Default 08-25-2010, 04:52 PM

Ok, I figured that out-ish, so it that part works for me.

Now I need it so that when it goes 10 meters away from my dude that it will return to it's original position.

Edit: Nevermind, I figured it out! All's good, thanks for your help guys.

Last edited by Malqua; 08-25-2010 at 05:29 PM.
   
Reply With Quote
Old
labtek9
Senior Member
 
labtek9's Avatar
 
Status: Offline
Posts: 122
Join Date: Aug 2009
Location: Pluto
Default 08-25-2010, 09:58 PM

as an example in a game I made, like other FPS's, there is a cross arrow. I have

bullet move to crossarrow
bullet move 20 meters forward
bullet invisibility 0%
bullet move to gun duration 0 seconds

then I have it check for collision. This may not be a very technical, or advanced way but I find it nice and easy!


Roar Face! >:O

Circle Buddy!
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.