Community
AGI Programming => Mega Tokyo AGI Archive => Topic started by: bok on September 23, 2001, 11:40:56 AM
-
Hi, another problem:
I try to turn a room into some kind of shooting-gallery. I have 5 guys running around with the
wander(ox);
-command and a crosshair-view for the ego.
now how can i check if the crosshair is somewhere near the guys? i have all the coordinates from the guys which i got by
get.posn(ox,vx,vy);
but i cant use commands like
if posn or
if center.posn
because i can only compare the coordinates to integers and not to vars.
what can i do?
bok
-
Hi everybody,
I found out myself how to set up some "shooting-gallery" last night. For anyone of you interested, here's the code for a room with 3 guys running around, waiting to be shot:
#include "defines.txt"
if (new_room) {
-
tat looks good i might try it out sometime.
just a tip though - instead of using commands like:
subv(vX,vY);
just write vX - vY = vX
or vX -= vY
also instead of
if(greaterv(vX,vY)){
use
if(vX > vY){
its easier and far less confusing