HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

arrow keys moving

08-03-2004, 04:23 PM#1
Zeal_
I've been trying hard latly to make a trigger in which when you hit an arrown key your unit moves a little bit (up down left or right) can someone help me here? I already got the main event of the thing.
Event-
Player 1 presses the left arrow key

I need some conditions and events..

thank you in advance
08-03-2004, 04:42 PM#2
Eeporgorg
Actions-
Pick every unit in owned by player 1 and do action issue order to move to point of picked unit offset by -50, 000

for up, it would be 000, 50
down, 000, -50
right 50, 000

That's how I would do it, at least :)(This is assuming player 1 has only 1 unit.)
08-03-2004, 05:43 PM#3
Zeal_
thank you. i'm assuming that the one you demonstarted is left?

EDT: it didnt work :( .
08-04-2004, 02:13 AM#4
Zeal_
BTW (sorry i didnt put in my last post)

i need a trigger that makes the unit attack while pressing a button too. Just attack, no really need to have a target. Probaley isnt possible. But. .... ... I'll give rep or 2 if you help me.
08-04-2004, 02:33 AM#5
Eeporgorg
The moving actions worked when I tested them, just increase the "50"'s to "200"'s.

Also, the only way to make the attack thing would be to have a hotkeyed spell (since the only eventable keys are the arrows) that would do a really short shockwave in the direction the unit was facing, which could easily be done with triggers. just put "attack" in the art - animation names cell of the ability. Also, make sure the shockwave's projectile art's path is just a blank space(making it invisible)

Events
a unit begins casting a spell
Conditions
Ability being cast is equal to attackdummy
Actions
Create 1 dummycaster at position of casting unit facing default building degrees
Add ability attackreal[The shockwave with short range] to last created unit
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave ((Position of (Casting unit)) offset by 5.00 towards (Facing of (Casting unit)) degrees)
08-04-2004, 02:42 AM#6
[niro]
Its easier to do it than make shockwave, just base it off something like summon bear, something that summons a unit right infront of the hero, no matter where its facing, make a custom unit that has a permanant immolation type ability, have it have no effect shows, unless you want effect, have the unit have no model either, when the hero casts the spell, i plays the attack animation, inthe object editor, with the spell, (ex summon bear, at the very top, where it says the animations, type in attack) This will play a attack animation, from the units anitmations when its casted.

So, the guy casts the spell, and thats it, the invisible unit spawns, deals its 1 shot of immolation based ability, then dissaperes without a trace! MAKE SURE THE DURATION OF THE SUMMON SPELL IS ABOUT 1 SECOND.
08-04-2004, 02:45 AM#7
Eeporgorg
Stop being so smart, niro ^_^


....damn, I'm stupid...
08-04-2004, 06:03 AM#8
Dark_Uber
Accually, the arrow keys are not the only eventable keys...
See that little one in the upper left corner ^_^
08-04-2004, 04:35 PM#9
Zeal_
Quote:
Originally Posted by Computer[Uber]
Accually, the arrow keys are not the only eventable keys...
See that little one in the upper left corner ^_^


Esc key?


Thanks for the tiggers i'll start trying them again.
And if anyone wants to help with the map, Its in my Sig.
08-04-2004, 07:30 PM#10
[niro]
esc key, and f1 f2 f3 f4 etc, but you have to use dummy heros.
08-04-2004, 09:05 PM#11
Zeal_
i Honestly didnt know you could use f1-4
08-04-2004, 10:54 PM#12
Syco
Actually, for what you're talking about, I don't think you need a bunch of fancy stuff for attack. There should be an action to force a unit to play animation. Just fill in "attack" as the animation.
Oh, and if you want to "rotate" the guy and move "forward" and "backward" instead of set (sidescroller-like) movement, I can tell ya.
-Syco
08-05-2004, 12:02 AM#13
[niro]
Quote:
Originally Posted by Syco
Actually, for what you're talking about, I don't think you need a bunch of fancy stuff for attack. There should be an action to force a unit to play animation. Just fill in "attack" as the animation.
Oh, and if you want to "rotate" the guy and move "forward" and "backward" instead of set (sidescroller-like) movement, I can tell ya.
-Syco


Its not fancy at all, and also, the animation is less likely to be cut short, because it will be cassting a spell. just fill in attack, as the animtion for the custom spell.
08-05-2004, 03:05 AM#14
Zeal_
Good idea, i'll get right to that.