HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Wierd Missile Creation Glitch

10-30-2007, 02:53 AM#1
bomber7
Anyway, I'm building a map where you drive around a helicopter and shoot people. (Wheeee) So far I have done mabey two or three hours of work and I have encountered a problem. I made an ability that when you click it, it fires a missile. (hotkey f) I'm building another system ontop of Vexorian's collision missile system to create a variety of missile behaviors. The ability tests the very simplest of the behaviors. (Go straight until you hit something) It worked fine. When i pressed the f key I fired just fine. I could press the f key and I would fire as fast as I want. Then I found that when I was turning in my helicopter that the missile did not always fire when you press f. When you stand still it fires as rapidly as you cast the ability. (press f)

To test this yourself first hit the left or right arrow key to focus your camera. Then hit f a whole bunch so you can see the missile system appears to be working fine. Then hold the left or right arrow key (not both) and press f a bunch. You'll notice that only one or two missiles are fired.
Attached Files
File type: w3xCopterGame.w3x (145.9 KB)
10-30-2007, 03:17 AM#2
Ammorth
This would have to do with the unit unable to cast a spell while turning.

Solution: Use another unit (that the players will never see) which is selected and used for all spells. This way the dummy unit can always cast his spells and the visual unit (copter) will rotate.
10-30-2007, 03:31 AM#3
bomber7
Hmm, I looked into it and you are correct. The problem is that the turning happens instantly! Why? Because I make a new unit every 5 degrees with the old units hp and position facing +-5 degrees.

Does anyone have any other methods of detecting a key press (A-Z) I would rather the player have selected the helicopter, though I will take your solution if there is no other way to detect a key press.
---Edited due to rereading above post.
10-30-2007, 06:03 AM#4
Pyrogasm
The only two ways to detect key presses other than the up, down, left, and right arrow keys are to use dialogs and/or spells inside disable spellbooks with hotkeys for the abilities you want to use.
10-30-2007, 01:41 PM#5
bomber7
Ok thank you, I will take Ammorth's suggestion