HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hotkeys to Keyboard Events

06-12-2005, 03:06 PM#1
Tim.
I want to be able to adjust the camera AOA (angle of attack) in-game using the keyboard, however Im using the Arrow Keys as the Movement system, and the ESC key for other purposes.

Is there a way for a trigger to read when a hotkey is pressed AND when its released? That way I could make it so that by holding down X, for instance, the camera angle moves down over time, however when I release the key, the angle alteration stops.

(Note: This is a First Person Shooter, so the movemnt needs to be fluent and easily used)
06-12-2005, 03:15 PM#2
Guest
I've made such a thing in one of my maps called WarCrafTrack Mania ( http://www3.sympatico.ca/jmperot/WarcrafTrackMania.zip )
All I did is to set a Boolean to True when the key is pressed and to False when it is released. Another trigger that executes itself each <I don't remember how many time> seconds to update each player's camera rotation. The only difference between my map and yours is the camera property that has to be changed.
06-12-2005, 03:38 PM#3
shadow1500
i dont understand whats wrong with using the page-up, page-down keys or the mouse wheel for that, since its already built in wc3.
06-12-2005, 05:36 PM#4
Tim.
@Windpower No, you used Keyboard event, not hotkeys.

@Shadow Because I use a custom FPS view. Scrolling with the mouse whele will have no effect.
06-12-2005, 09:52 PM#5
Guest
shadow1500 you have posted 100 post congratulations !

If you want to use hotkeys, then make up some abilities with no icon with hotkeys, and create an event with "A Unit Begins casting an Ability" instead of a keyboard event
06-13-2005, 09:20 PM#6
Tim.
Yes im well aware. Hovever that would require 'key-smashing' (Rapid Key Pressing) in order to raise or lower the camera. In a FPS it is quite essential to make simple fluid movments. Especially when you need to be able to move and fire at the same time.
06-13-2005, 09:28 PM#7
mogmiester
why not have the ability that determines wether to move or to change the camera angle. Have a boolean, and as the ability is cast, changed it from true to false and visa versa, and the when the keyboard arrows are pressed, check this boolean
06-13-2005, 10:12 PM#8
Tim.
That would require the clicking once to move the camera up, then click again to stop it. Then to return one must do the same.

Thats acceptable, however would prove a little anoying in a fast-paced FPS.
06-14-2005, 05:48 PM#9
mogmiester
no, i mean so that you can just cast the spell (x for example), and then you can change the camera angle any way you like by using the arrow keys, and then to move again you just press x again
06-14-2005, 06:57 PM#10
Tim.
Hmm, thats possible, however it would be nice to be able to change aim hight while running.

If all else fails I can use that, but any other ideas for mid-movemnt camera changes?
06-19-2005, 01:57 PM#11
Guest
Maybe you can create some pre-defined camera angles that can be activated by pressing a key once
06-20-2005, 05:03 AM#12
Ant
It simply isn't possible in conventional multiplayer to detect the holding and releasing of anything but the arrow keys.

Anyway, just a suggestion, test the map out on bnet first before continuing so you can gauge exactly how fast paced it needs to be, because keyboard movement delay (always present on bnet) makes it hard to do precise movement.

I would go somewhere along WindPower's suggestion. Maybe make one button turn up by 4 degrees and one turn up by 8 degrees. And double/triple tapping these two buttons can allow you to look up or down in varying degrees.
06-20-2005, 07:40 AM#13
Anitarf
Having recentl tested a map with keyboard movement, I must say the lag makes it impossible to aim (at least for me... maybe the lag is not so bad if the host and cliend live nearby, or if you play the map on LAN), unless you want to move like a snail in which case you are an easy target, and still can't get a guaranteed aim even on stationary targets...

or maybe I just got spoiled by LAN Quake and don't know how to play with lag at all. But still, I am talking about more than 1000ms ping here...
06-20-2005, 01:18 PM#14
Tim.
Well I ran it on B.net with 2 v 2 and the lag was acceptable. Sence everyone accept the Host experienced it, it was still fair. However, then again, all of us live nearby (Hour or two away). Neverthless, for this I just ended up making an ability to increase the AOA by 5. You just have to button smash to increase it.

Thanks for the suggestions.
11-06-2007, 02:14 AM#15
Draco_9000
you could always use a text based camera in which you type in but im guessing thats not what youre looking for