Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Missile code? (http://www.alice.org/community/showthread.php?t=10960)

sfunk 01-11-2015 01:18 PM

Doing things the easy ways isn't always helpful though. To become a better programmer, you have to be willing to try new things to become a better and more efficient programmer. Especially if everyone keeps feeding step by step guides to do exactly what he/she wants, he/she won't learn the basics that will allow them to think of those steps themselves. So it's important to not do too much hand holding when helping. Give them the building blocks they need to build there own path to success.

Killerzeron 01-11-2015 07:53 PM

if u have a problem
 
[QUOTE=sfunk;55354]Doing things the easy ways isn't always helpful though. To become a better programmer, you have to be willing to try new things to become a better and more efficient programmer. Especially if everyone keeps feeding step by step guides to do exactly what he/she wants, he/she won't learn the basics that will allow them to think of those steps themselves. So it's important to not do too much hand holding when helping. Give them the building blocks they need to build there own path to success.[/QUOTE]

I am new to alice. However, i understand the codes very well except that everything is a readymade in Alice. Unlike in Java, you need to do everything yourself than in Alice. Alice has everything ready-made like objects, codes etc. If i was not willing to become an efficient programmer or try out new things, I wouldnt be joining or even touching Alice on the other hand. If you're ready to help then its a warm welcome than anything, elsewise. Also, that doesn't mean anything if the person is new while the other is helping and an interuption of sudden "dependancy" That you mean. If you can't bare me, the ignore list exists.

sfunk 01-11-2015 09:24 PM

My responses are not in a harsh tone. I have been a member of there forums for quite awhile now and always try to help. I was responding to raven's post since the way he is offering is the inefficient way of coding what you want. And I was proposing to raven, instead of telling you step by step how to do everything, just to give you the basic information to get you on the right path. And if you know java or any other coding language, you're taking a step backwards in progress if you're focusing on Alice.

Lastly, creating the object variable under the worlds properties and making it a list that contains all use objects you want detection to occur on is one of the more efficient ways of doing collision in Alice with multiple objects. Using that variable to be called in a collision method would be a good route to go. I have to assume you're not proficient in the English language, so you may not understand the tone of what I am writing as being helpful, but that's what it is.

x2495iiii 01-12-2015 05:11 AM

Seems like there's a bit of miscommunication here.

sfunk, it's very much appreciated when a senior member helps others to learn Alice, but it seems like Killerzeron is doing fine already. If a user doesn't appear to be responding positively to a suggestion, simply move on. There are plenty of other users in need of help on the forums.

Killerzeron, sfunk was trying to be constructive with his posts. If you don't need his help, simply say so.

RavenOfCode 01-12-2015 08:40 AM

[QUOTE=x2495iiii;55358]Seems like there's a bit of miscommunication here.

sfunk, it's very much appreciated when a senior member helps others to learn Alice, but it seems like Killerzeron is doing fine already. If a user doesn't appear to be responding positively to a suggestion, simply move on. There are plenty of other users in need of help on the forums.

Killerzeron, sfunk was trying to be constructive with his posts. If you don't need his help, simply say so.[/QUOTE]

[SIZE="5"] ^[/SIZE]

chickentree 01-13-2015 12:08 PM

Is there a reason not to use events?
 
[QUOTE=RavenOfCode;55346]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 :)[/QUOTE]

It seems to me that events in Alice are more efficient and less error prone than infinite loops yet they are rarely mentioned. It there a reason not to put actions in an event rather than an infinite loop?
The types of events make it easy to check for conditions and to turn the events on and off and you don't have to figure out what infinite loop your code is stuck in when it doesn't do what you want.

Mark

RavenOfCode 01-13-2015 02:52 PM

[QUOTE=chickentree;55362]It seems to me that events in Alice are more efficient and less error prone than infinite loops yet they are rarely mentioned. It there a reason not to put actions in an event rather than an infinite loop?
The types of events make it easy to check for conditions and to turn the events on and off and you don't have to figure out what infinite loop your code is stuck in when it doesn't do what you want.

Mark[/QUOTE]

True, I have just gotten used to loops. There are alternatives to almost everything in Alice... that's what makes it useful :)


All times are GMT -5. The time now is 07:52 AM.

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