HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Selecting unit for arrowkey movement

07-29-2004, 05:55 AM#1
DisabledJew
Ok, I'm working on a third person shooter map and it's all good and stuff, and I'm trying to put arrow key movement in.

the map initiates by showing a dialog to all players consisting of the class choices, I only select marine to test so we will use that.

So it creates a marine for player 1 red, gives him the Uzi, and everythings fine, when that marine dies, it waits 10 seconds and creates another marine, gives him an Uzi, and everythings fine. (You get to shoot stuff too, and ride in vehicles and shoot stuff out of vehicles, and plant explosives in vehicles, and snipe people too in between dying)

Here's the problem, on the trigger

Event: Player 1 Red presses Left Arrow

Action: Issue order to move *UNIT* offset -100000,0.

(I really don't like this move system, but it was the only thing in the tutorial. Then I have another trigger that when the player releases the left arrow key, the unit stops.

The main problem here is not only the fact I hate how it will go diagonal when moving, is that I can't select the unit, and I have no idea on how to set variables up for which unit to move. (I know how to use variables, I'm just stuck on this)

So if you know what to do, help please. Rep points :D
07-29-2004, 06:13 AM#2
ForgottenLight
For what you want to do, you should probably remake your movement triggers, and use polar offset of the units rotation for like 200 distance units, that way, the unit will actually move the direction you press, and have the move-order trigger loop ever .2 seconds or something untill the player releases the key, use boolean variables for that and just set the selected unit to a unit variable, and use that variable in the movment triggers... I have a keyboard movement system in one of my maps that works really good, but it is over-head RPG style(ie. up arrow will always make the unit move north, down arrow will always move the unit soulth etc.) You need to use polar offset with the unit's rotation. And have the Left/Right arrows only change rotation, makes it easier. I feel like I'm forgeting something, oh well, try that out and see if anything goes wrong.
07-29-2004, 06:31 AM#3
DisabledJew
Hmmmm, Reading it, it sounds great, but I am not good with offsets and all thats, the geometry factor just doesnt bode well with me, if you could put that in code, it would be great,.

Thanks for the feedback though, just put it in code with the actual trigger, I like the idea of rotation instead of movement on left and right.
07-29-2004, 03:40 PM#4
ForgottenLight
You're not reading carfully, I told you, I don't have the code for what I described, and I can't make the code because I don't have a computer right now, besides, its your map, hash out the code yourself.
07-29-2004, 03:54 PM#5
DisabledJew
Quote:
Originally Posted by ForgottenLight
You're not reading carfully, I told you, I don't have the code for what I described, and I can't make the code because I don't have a computer right now, besides, its your map, hash out the code yourself.

Woah, never in your reply did you say you could not make the code because you don't have a computer, I've bashed out all my other code, I just need help with this one because I'm not good with angles and offsets and stuff, hence why I came here.

Thanks anyway though, I kinda got it working, but I can't make the unit rotate all the way around. BAH