HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Moving unit with arrow keys solved

10-06-2002, 12:46 PM#1
SuperIKI
I released a map to the public: Undead Invaders!
It's unprotected so you can see it's triggers and learn from them. That's why I put up a thread here as well.
For your convenience: No trigger is written in Custom Text.
The triggers include:
- Some Camera Stuff
- Movement Commands to Units
- And the best:
Controlling a unit with the ARROW KEYS!

:D

The arrow key stuff works only in single player, but hey: It's a single player map.
Well, maybe you get some new inspiration from the map. Get it here:
http://www.wc3campaigns.com/forums/s...&threadid=4776

BTW: It's also fun to play.
10-06-2002, 03:12 PM#2
Mr.123
:D

Yup this works nicely. Too bad current camera information isn't passed to the other clients(there really isn't any reason to do so) so it doesn't work in multiplayer :(. Good stuff though.
10-06-2002, 08:02 PM#3
dataangel
What method does it use? At the moment I'm too lazy to download it.
10-06-2002, 08:16 PM#4
weaaddar
it detects the camera source changing and moves your balista to the center of the screen pretty ingenious. The firing mechanism is a little screwy its all aiming for the closest line so even if you have 1 guy left on the first line you can't take stray shots at the guys in line 2.
10-06-2002, 08:40 PM#5
ChronOmega
hey weaddar i figured out how to fix that

in the trigger "shooting button" the last action looks like this

if(Target Equal to No unit) then do (trigger -Run shoot distance <gen> (ignoring conditions)) else do (trigger Run shoot unit <gen> (ignoring conditions))

instead of that put

if(Target Equal to No unit) then do (trigger -Run shoot unit <gen> (ignoring conditions)) else do (trigger Run shoot unit <gen> (ignoring conditions))


so all you do is make it so it only runs shoot unit <gen>
ive tried it it works!

EDIT this wont work for 3rd row things but maybe some one else can figure out how to do that
10-06-2002, 08:48 PM#6
Guest
I´ve been lookin´all over 4 this ! Thx a lot !!!!

:D
10-06-2002, 09:11 PM#7
SuperIKI
@weaaddar: Not 100% correct.
It doesn't only fire at the first line. You CAN fire at targets from other lines. Look at this:
Code:
X means, you can hit it. O means not.

1)
 O O O O O O O O O
 O O O O O O O O O
 O O O O O O O O O
 X X X X   X X X X

2)
 O O O O O O O O O
 O O O O O O O O O
 O O O O X X O O O
 X X X         X X
You can hit 2nd row targets if they have no neighbours in the first row. This is because the region for possible targets has a limited width.
Try it and you'll see.
:D
@Mythmon: Nope, the 'shoot distance' trigger will only run, if there is really NOBODY in front of you. So your replacement won't do anything I think.
'Shoot distance' always fires right above the snow line. It's almost never called. It cannot work that way.
10-06-2002, 09:15 PM#8
ChronOmega
my way works but if theres absoulutly nobody in front of you your ballista will move to to egde of the snow then get transported back

and ive font out that you can shoot 3rd and sometimes even fourth row targets if you use my way

try it and see superiki

ps it makes it never use shoot distance
10-07-2002, 03:51 PM#9
SuperIKI
Quote:
Originally posted by Mythmon
my way works but if theres absoulutly nobody in front of you your ballista will move to to egde of the snow then get transported back

and ive font out that you can shoot 3rd and sometimes even fourth row targets if you use my way

try it and see superiki

ps it makes it never use shoot distance

OK. I tried your way. But it doesn't change anything. I would suggest that you try it the way IT WAS BEFORE and you'll see that it is how I posted it above. You CAN shoot 2nd line monsters. You ALWAYS COULD. And 3rd row and 4th row. OF COURSE YOU CAN! Like stated above. The problem weaaddar had does only occur when shooting at a 2nd row unit with a neighbour in the first row. And even then it occurs only sometimes. And your code change does NOT change that in any way. The code change you made does almost change NOTHING AT ALL. It only does something when there's NOBODY in front of you!!! And instead of just firing a set distance like it should, you replaced the triggers. And that change made it like you wrote:
"if theres absoulutly nobody in front of you your ballista will move to to egde of the snow"
That is the change you made!
I don't call it a bug fix but a bug add. Sorry made when I sound rude, but that's NO FIX!!!


And one last thing:
Everybody that wants to post some bugs here should absolutely know that they are really there. Please run some tests before posting to avoid posting bugs that aren't bugs.
AND PLEASE DON'T POST FIXES FOR BUGS THAT AREN'T BUGS THAT AREN'T FIXES!!! OMG!
:////
10-07-2002, 04:14 PM#10
FM_TertiaryEye
Cool SuperIKI!

Guys, why are you posting bugs anyway?

This is more of a demonstration if anything, its not like IKI's trying to mass market space invaders for warcraft.

Thanks IKI, great idea, this has its uses if you were making a racing game too, you can just have you car go through a series of columns and then teleport (seamlessly) down to the next column.

You keep an array of positions to bound the camera (use the x as the left x bound and the y as the right x bound). I might try this out.

| 2 | | 0 |
| | | |
| 0 | | 0 |
| | | |
| | | |
| 1 | | 3 |