Thread: Game help?
View Single Post
Old
debussybunny563
Senior Member
 
debussybunny563's Avatar
 
Status: Offline
Posts: 852
Join Date: May 2010
Default 04-03-2011, 06:35 PM

Quote:
Originally Posted by TauTrumpsPi View Post
I'm afraid this is a bit too complicated for me.

1. Could you explain what distance in front of, to the left of, etc functions do. And I have never used self built functions before, so

2. what does "return collision" mean? otherwise I think I get it.
1. Those are to calculate whether the object is within range, basically to make sure it won't register as a hit if you're facing any direction.

2. "collision" is just a true/false variable. It's set to true if the object can be hit, and false if not. "return" returns the value of that variable. So, if the object can be hit, you will get a true from the function. Then you can use that in an If/Else statement, like:
if <world.collision>
{
do method
}
else
{
do nothing
}


Last edited by debussybunny563; 12-21-2012 at 12:00 AM.

|--------------------------------------------------------------------------------------------------|
|Link to weapons collection: http://www.alice.org/community/showthread.php?t=7368 |
|--------------------------------------------------------------------------------------------------|

I have been dead for quite some time now; not much hope for resurrection.
   
Reply With Quote