Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Thread Tools Display Modes
Sgt Moose
Junior Member
Sgt Moose's Avatar
Status: Offline
Posts: 9
Join Date: Jun 2012
Location: U.S.A.
Exclamation Advice - 07-09-2012, 11:06 AM

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.

  1. 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. ????
  2. I need to know how to make enemies "die" when they get hit by an object (like a bullet)
  3. 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)
  4. If anyone could upload any extra objects, that would be great
  5. ANY other advice would be needed anytime

I would also like to know how to move and object just by dragging the mouse.
Reply With Quote
Super Moderator
x2495iiii's Avatar
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 07-09-2012, 12: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

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.

Reply With Quote
drellem's Avatar
Status: Offline
Posts: 35
Join Date: Jun 2012
Default 07-14-2012, 05: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
Reply With Quote

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 ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.