PDA

View Full Version : Advice


Sgt Moose
07-09-2012, 12:06 PM
When it comes to Alice worlds, I'm good at making movies, but not video games. If anyone could offer advice on the following problems, I would greatly appreciate it. :D :D :D

Problems:

I want the camera to do something when it gets close to an "objective marker" (which is just a cylinder), but no matter what distance I put into the "if Camera is at least __ meters from Objective Marker 1", the camera does the method when I don't want it to. ????
I need to know how to make enemies "die" when they get hit by an object (like a bullet)
I need to know how to make the camera go to a certain position when within certain distance of an object (like entering a vehicle)
If anyone could upload any extra objects, that would be great
ANY other advice would be needed anytime


I would also like to know how to move and object just by dragging the mouse.
:)

x2495iiii
07-09-2012, 01:30 PM
1. Change it to "if camera is within _ meters." That way, it will only happen when the camera is that close to the marker. Be sure to put the if statement in a while loop, to make the statement keep running to keep checking if the camera is close enough.

2. Same as above, actually, just sub the object you want to die for the cylinder and the bullet for the camera.

3. I'd use a dummy object. Move the camera where you want it to be in the world editor, then drop a dummy object at the camera's position, then use a "set point of view to" method to make the camera jump to the dummy object

4. there are plenty in arty's pack (http://alice.org/community/showthread.php?t=7113)

5. Just ask, I suppose

6. There's an event for that. Just add a "let the mouse move" event, then change the "any object" to the object you want it to move.

drellem
07-14-2012, 06:25 PM
When you are programming a game one of the most important things to do is to make sure that different game states are handled well. If you are writing an fps, then you will probably have an event something like "when mouse is clicked on anything do world.shoot"

However, you don't want players to shoot while on the main menu, so world.shoot should look something like this:

if(world.gamestate == "play"){
//code here
}