Thread: Missile code?
View Single Post
Old
sfunk
Senior Member
 
sfunk's Avatar
 
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 01-10-2015, 03:21 PM

You'd still have to make a variable list to use the object parameter if he wants the method to work for all objects this way.


Quote:
Originally Posted by RavenOfCode View Post
One thing I would do is make separate methods for the different things the plane is colliding with, as Alice currently can only use the centers of the object to collide rather than the polygons that make up the object.

My suggestion is 2 basic colliding methods:
1.this would be for buildings/other planes/whatever.
Make a method called planeCollide > add ifelse statement > add loopInfinityTimes > add the function if Mig29 is within 1 meter of world > make 2 paramerters, 1 for a distance and replace the '1 meter' with this parameter, the other is an object replace 'world' with this > put the ifelse statment inside the loop > make another method > put a doTogether in it > then place planeCollide into this and us the parameters for the object you want/distance you want. (inside the ifelse statement you can put the code you want for it to reset)

2. This would be for the ground.
Make a method called collideWithGround > add ifelse statement > add loopInfinityTimes > put if else into loop > added the function 'mig29 is below ground' > then put in what you want to happen for when it crashes into the ground > then call this method in the events tab.

Hope this helps, also Alice come with a pre enstalled flight sim, in tutorials, you might want to take a look at that


If you are stuck on a project, check out the tutorials I made here at this link:

http://alice.org/community/showthread.php?p=36778#post36778

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

http://www.youtube.com/user/sfunk1992?feature=mhsn
   
Reply With Quote