I have a 8 directional icon I have configured my East and West client inputs to rotate my icon I also configured my North client input to walk in the direction that my icon faces, But I have this for my North
step(usr,usr.dir)
dir = usr.dir + 2
it is the changing the Camera view that I have problems with, It is because it remaps the key's everytime the camera view changes is there any way to turn this off? please help me.
ID:149455
Apr 26 2002, 4:56 pm
|
|
Apr 27 2002, 8:15 am
|
|
Does anyone know how? Is that why no one answers?
|
it is the changing the Camera view that I have problems with, It is because it remaps the key's everytime the camera view changes is there any way to turn this off? please help me. That's what happens when modify client.dir. You want to modify client.mob.dir. Note that you rotating icons simply by adding 2 won't cut it, either. These are the directions from north, going clockwise. NORTH = 1 NORTHEAST = 5 EAST = 4 SOUTHEAST = 6 SOUTH = 2 SOUTHWEST = 10 WEST = 8 NORTHWEST = 9 You'd be better off using something akin to the following: src.mob.dir = turn(src.mob.dir,45) //turn mob counterclockwise 45 degrees src.mob.dir = turn(src.mob.dir,-45) //turn mob clockwise 45 degrees The clockwise/counterclockwise might be backwards, though, since I haven't used turn() in a while and it's a little underdocumented anyway. |
In response to Spuzzum
|
|
Noooo. LOL, thats not what i ment.
I know about that but that is not what I want to do, you see. I have it where it always posisitions the camera behind the character. But everytime it repositions the camera it remaps the keys. is there anyway to stop that? |
In response to Freeker
|
|
client.eye look it up.
|
In response to Exadv1
|
|
nooooooo... PLEASE LISTEN TO ME SOMEONE!!!!!
Ok I just want the camera to stay BEHIND MY CHARACTER! I am using dir var (client) and it is working fine. Exept it REMAPS MY KEYS EVERYTIME IT CHANGES THE VIEW! EXP. NORTH() normaly returns my NORTH code but it remaps the directional keys differenty when it changes the dir var (client) HOW CAN I STOP THAT? |
In response to Freeker
|
|
Freeker wrote:
nooooooo... PLEASE LISTEN TO ME SOMEONE!!!!! look up lazy_eye |
In response to Sariat
|
|
Does anyone even understand what I am trying to say?
|
In response to Freeker
|
|
I think YOU don't understand what WE'RE trying to say. Look up lazy_eye
|
In response to Sariat
|
|
YES I DO UNDERSTAND WHAT THE HELL YOUR TRYING TO SAY!!! I LOOKED UP LAZY_EYE THAT WILL NOT HELP ME!
Look at this. client North() if(usr.m==1) usr << "NOT WHILE YOUR ASLEEP!" else if(usr.Stamina<=1) usr << "Your to tired to walk!!!" else usr.Stamina-=usr.weight2 usr.jog+=1 if(usr.jog>=usr.Maxjog) usr.jog = 0 usr.MAXHP+=10 usr.MaxStamina+=25 usr << "<font color=blue> You gained 10 Max HP and 25 Max Stamina!" usr.Maxjog+=50 if(usr.SP<=50) sleep(3) step(usr,usr.dir) dir = usr.dir + 2 else if(usr.SP<=100) sleep(2) step(usr,usr.dir) dir = usr.dir + 2 else step(usr,usr.dir) dir = usr.dir + 2 East() usr.dir = turn(usr.dir, -45) West() usr.dir = turn(usr.dir, 45) CHeck out the Client.dir That is what I mean, It works but it remaps my keys, HOW CAN I STOP IT FROM REMAPING MY KEYS!?????????? |
In response to Freeker
|
|
sorry, I guess I wasn't discribin it right I am just gettin pissed tryin to get this to work.
|
In response to Freeker
|
|
So no one is gunna help me?
|
In response to Freeker
|
|
If no one understands what you're saying, why do you keep saying it the same way?
Anyways, I think I've got it figured out now... although saying "behind" is a bad way to describe an overhead view. You're making it so that when the player turns, instead of showing the character turning, the world appears to be turning around the character, as a way of showing the character's perspective, and so you're changing client.dir to "flip the screen around." You're concerned that it's, as you put it, remapping the keys. What it's doing is keeping it so that, in the default movement system, if you press the "up" key, your character will move "up", relative to the screen, regardless of whether "up" (client.dir) is NORTH, SOUTH, EAST, or WEST. You have overwritten the default movement system... what you need to do is overwrite it further. I recommend making new procs, and calling them client.Up(), client.Down(), client.Left(), and client.Right() Take your movement code and move it to these procs. Now overwrite client.Move(loc,dir) with the following code: switch (dir) if (client.dir) client.Up() //The up key == client.dir if (turn(client.dir,90)) client.Left() //client.dir + 90 degrees == left key if (turn(client.dir,-90)) client.Right() //client.dir - 90 degrees == right key if (turn(client.dir,-180)) client.Down() //client.dir flipped around == down key Note that I'm notoriously bad with east/west and left/right, so you might want to double-check those. |
In response to Freeker
|
|
O I get it now.
client.dir = client.mob.dir However diagonals may cause you problems, Lesbian Asassins answer is much better looking. You may want to remap the eye a bit but that requires a slightly complicated formula that I don't want to write right now. |
In response to Lesbian Assassin
|
|
THANKS!... It gave me a idea that was really close to what you told me, I made macro's for North() West() ect..., And made them refer to verbs. Now it works fine.
THANK YOU SO MUCH! THANKS! |