hi ppl were making gothic 2 rpg map we have a close 3rd person camera mod and we need to know how to make the character move with arrow keys or at least wasd
You can only use arrow keys. DL my InstaGib and look at the triggers. There you'll find the movement. You can either copy it or just c how i've done it. (Quite complex, don't so expect easy triggers)
CMEPTbhi ppl were making gothic 2 rpg map we have a close 3rd person camera mod and we need to know how to make the character move with arrow keys or at least wasd
event -
player X presses left key
actions -
set bLeft[player number of triggering player] = true
event -
player X releases left key
actions -
set bLeft[player number of triggering player] = false
//same with right
event -
player X presses up key
actions -
set bUp[player number of triggering player] = true
event -
player X releases up key
actions -
set bUp[player number of triggering player] = false
event -
periodical every 0.50 seconds
actions -
for A = 1 to MaxPlayers
set fFace[A] = facing direction of unit[A]
if bLeft[A] == true then
set fFace[A] = fFace[A] + 8.00
if bRight[A] == true then
set fFace[A] = fFace[A] - 8.00
make unit[A] face fFace[A] degrees over 0.00 seconds
if bUp[A] == true then
set pointMoveTo[A] = position of unit[A] offset by 128 towards (fFace[A]) degrees
order unit[A] to move to (pointMoveTo[A])
call RemoveLocation( pointMoveTo[A] )
end loop
thats the basics, and its also only one of several ways to do it
can u plz tell me what are the veriables is it real booleran stuff like that cuz im noob at map making cant figure out by myself and in insta gib i could not use the code cuz like i said im a noob but the map is very cool
Well, If you really need help, open the warchaser map. I learned many basic things from that map, except cinematics. I've played gothic 2, love it, but gothic 1 story is still the best. Why don't you make gothic 1 RPG?
Well what raptor said is almost the same way how i did it in InstaGib variables are boolean, and facing of the hero is real
Now i'll tell u how to make the camera turn with the hero:
variables: hero: a hero defined when the player selects one, this refers to his/her hero. (unit variable) HeroFacing: the facing of the hero. Can be used in other triggers, coz this one doesn't really needs it.
events: periodic: every 0.01secs cond: - action: for each integer A 1 - max players set variable HeroFacing (int. A) to facing of hero (int. A) lock camera of player (int. A) to the hero (int. A) set camera of player (int. A) angle of attack to 325-360 (any between these values are good) set camera height of player (int. A) to 50-150 set camera distance of player (int. A) to 250-600 set camera facing angle of player (int. A) to HeroFacing(int. A)
and in case of movement i suggest to use 0.1sec periodic event. That won't be so choppy. And not +-8 deg turning, that's extremely slow. +-15 or 20 is good.
The facing is useful and somethign I have not known before. But you can give orders to units when they move via arrow keys, by offset. Simply make them move to their position, facing position offset by somewhere around 50-90 to make them move a tiny bit
event -
player X presses left key
actions -
set bLeft[player number of triggering player] = true
event -
player X releases left key
actions -
set bLeft[player number of triggering player] = false
//same with right
event -
player X presses up key
actions -
set bUp[player number of triggering player] = true
event -
player X releases up key
actions -
set bUp[player number of triggering player] = false
event -
periodical every 0.50 seconds
actions -
for A = 1 to MaxPlayers
set fFace[A] = facing direction of unit[A]
if bLeft[A] == true then
set fFace[A] = fFace[A] + 8.00
if bRight[A] == true then
set fFace[A] = fFace[A] - 8.00
make unit[A] face fFace[A] degrees over 0.00 seconds
if bUp[A] == true then
set pointMoveTo[A] = position of unit[A] offset by 128 towards (fFace[A]) degrees
order unit[A] to move to (pointMoveTo[A])
call RemoveLocation( pointMoveTo[A] )
end loop
thats the basics, and its also only one of several ways to do it
Choose the "Set Variable" Action. Create a boolean variable if u haven't created one before.
Oh and something: The InstaGib movement script makes difference between turning while standing still and turning while in motion. It uses two different triggers for turning, and there's an if/then/else in each what checks if "FWD" var is true or not. If false: then it orders the hero to face +-27 deg from current facing. If true: then moves to current posiotion with polar offset: i think 125 towards +-19 deg from current facing.
yes i used insta gib but the left right triggers didnt work so i did something else i made a trigger that will turn the hero 60 degrees left or right and now it almost as good as i wanted it