Alice Community

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

Techique 05-20-2010 04:58 PM

Fps help
 
So i have my Fps all setup...
Problem is i can look up and walk forward into the sky, or down into the ground... anyway to fix this?

cbw92 05-20-2010 06:57 PM

It sounds like you're turning the whole characcter forward and backward when you try to aim up and down. Try making two objects, or one object, and control the camera. So the first object will move on a 2d plane (the ground) and the camera is then set vehicle to your first object. Now, seperately turn the camera up and down, and it will function independantly of the character.

Dameria 05-20-2010 07:34 PM

[QUOTE=Techique;21559]So i have my Fps all setup...
Problem is i can look up and walk forward into the sky, or down into the ground... anyway to fix this?[/QUOTE]

I have made a few worlds in which I have a fix to this. What I did was I created a simple cube called "body", and I made it so that any movement forward, backward, left and right is done by "body", but looking up and down is done by the camera, and the camera is vehicle to the body. Try to find my "looktest" world (if you can't find it I can post you a link to it), but I have a method where I use the mouse to look left right up down, but the left and right move the body and up down move the camera, so the body always stays parallel to the ground and does not move up when I am looking up and moving forward at the same time.

Does this make sense?

Techique 05-20-2010 07:48 PM

Yes, thank you ill keep this in mind but, somehow it fixed itself... must of been something i did. another question though, I have Health setup for my player, now im doing health for zombies.... but how do you setup separate health bars for each zombie? i have a variable that holds each zombie.

Dameria 05-20-2010 08:05 PM

[QUOTE=Techique;21562]Yes, thank you ill keep this in mind but, somehow it fixed itself... must of been something i did. another question though, I have Health setup for my player, now im doing health for zombies.... but how do you setup separate health bars for each zombie? i have a variable that holds each zombie.[/QUOTE]

This would be a lot easier if the world function "(object's) variable named ____" worked properly, because then you could just have health variables for every zombie and use a list for all of them with that function being used to check each one. The only way I can think of doing this though would be to have a very large if else statement with a nested if/else for every zombie that is being checked. For instance the zombie is hit, it runs the health method, and you put in the zombie that is hit as the parameter for the method, and in the method you say if(zombie == zombie1) ((with zombie as the parameter)), then you do whatever method you have for lowering it's health, else if zombie == zombie 2, and then the next health method for zombie 2 using his own unique health variables.

Techique 05-20-2010 08:13 PM

Seems Tedious..... I think i Might make them One shot zombies.. and have maybe a few bosses and setup the health like i did with my player Health.

Dameria 05-20-2010 08:17 PM

Yeah, that is what most people do. I can't wait until they fix that function though so that I can use it. Try dropping that function into an if else statement though and tell me if it works, it might just be my version that does not work.

Techique 05-20-2010 08:21 PM

Hold on I'll check it out

__________________________

Didn't work

Techique 05-20-2010 08:26 PM

Hm.... Quite Confused now....

Bullet 2 meters near "item_from_Zombies"
"item_from_zombie" Turn Back .25 revo's

but instead they all 3 i have setup right now turn backwards one after another think you can check it out?

Dameria 05-20-2010 08:31 PM

Its because it checks to see if the bullet is within all 3 of the zombies, and when it is within one of the zombies, you say to all 3 zombies backwards. If you want it to only turn the 1 zombie backwards that the bullet collides with, create a seperate method called "die" and add an object parameter for "zombie", then in that code when it checks to see if the bullet is within each of the zombies, you just run the method world.die with the zombie parameter being "item_from_Zombies". This way, it only runs one method turning only that one zombie backwards, but not all of the zombies from the list like you had before.


All times are GMT -5. The time now is 04:21 PM.

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