HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help! Third Person camera and keyboard!

07-02-2005, 10:46 PM#1
maddd0h
m making an RPG and i want to have a 3rd person camera and arrows to control movement. The Azeroth Grand Prix map has almost exactly what i want, buts it all in jass, can someone please give some intructions on how to implement it into my map, and change things in it like speed and such.

Would be greatly apreciated. Also, excuse my horrible spelling.
07-06-2005, 12:10 AM#2
maddd0h
Bump?
07-06-2005, 01:50 AM#3
Tim.
This question is asked basically two times a week. Do a search of the forums for 'Arrow Key Movement' or 'First Person' etc. Its not hard to do.
07-06-2005, 04:45 AM#4
maddd0h
I did, and i cant find anything the moves smoothly. I can do the thrid person view and everything, but the arrow key control is hard. All the things ive found so far have stupid triggers where you cant even turn while your moving, or have only cardinal directions! The Azeroth Grand Prix has an almost flawless movement system, but i havnt got a clue how to implement into my map, any pointers would be appreciated.
07-06-2005, 04:55 AM#5
maddd0h
Its in JASS and i cant understand it..
07-06-2005, 03:56 PM#6
Tim.
Okay, heres what I'm using for now, before I goto JASS for my movement.

Loop checks for booleans of whether or not --> is pressed etc. Somthing like this:

If/Then/Else
-->Is pressed
Then
If/Then/Else
If ^ is pressed
Then
Order unit to move with a polar offset 45 degrees of current unit position.

Etc.

Sorry, no WE with me here.
07-07-2005, 10:53 AM#7
Ant
http://www.wc3campaigns.com/showthread.php?t=27801

If the map doesn't work,

http://www.wc3campaigns.com/showthread.php?t=29961

The rest you should experiment yourself. -.-

Third person cameras, just lock on to the target, and play around with camera stuff in the triggers (angle of attack, distance to target, facing of camera, and if you want the camera to look in front you have to pan the camera forward).

Arrow key movement is just a simple system. I'll outline the steps for you.
1 - You detect the arrow key is released/pressed/depressed (if it's depressed send the arrow key for counselling). Store that info.
2 - Check if your arrow key is pressed or not, and based on that do an action.
2a - With acceleration, if your up arrow key is pressed, you check if the maximum speed is reached, if not increase velocity. Likewise do the opposite for the down arrow key, or if no key is pressed for auto slow down.
2apart2 - If it's acceleration and not simple stop and go, you have to create a trigger to move the unit in the direction it's facing by its velocity, which you modify in 2a.
2b - Check if your left/right keys are pressed, and turn the unit accordingly. If you want to do acceleration in turning do the same thing in 2a and 2apart2.

I'll post a disfunctional map but I apparently already posted it somewhere here:
http://www.wc3campaigns.com/showthre...t=68728&page=2

at the middle. If the dl doesn't work, ack...