Leinad said:Hey how do you move and turn using the arrow keys? Like say you wanted to make a map with a starfighter that always moved ford and you could feel like you were actully flying it by turn it and stuff?
Thanx
event -
player presses left key
actions -
set bLeft = true
event -
player releases left key
actions -
set bLeft = false
//same with right etc...
event -
periodical every 0.5 seconds
actions -
if bLeft == true then
make playerunit face (facing direction of playerunit + 10.00)
if bRight == true then
make playerunit face (facing direction of playerunit - 10.00)
if bUp == true then
order playerunit to move to position of playerunit offset by 128 towards facing direction of playerunit
Leinad said:Thanx, I will give it a shot. However I need it to turn while your moveing. I have seen it done very well befor on a map I think was called legasys tide of the serpent (sry about bad spelling). Anyway if anyone comes up with more ideas of how to make this work im all ears.(You can also give me ideas for the starfighter map if you want.)
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
set nLeft[player number of triggering player] = 0
//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
set nUp[player number of triggering player] = 0
event -
periodical every 0.05 seconds
actions -
for A = 1 to MaxPlayers
if bUp[A] == true then
set nUp[A] = nUp[A] + 1
if nUp[A] >= 25 then
set fSpeed[A] = fSpeed[A] + 5.00
else
set fSpeed[A] = fSpeed[A] + 2.50
else
set fSpeed[A] = fSpeed[A] - 10.00
if fSpeed[A] < 0.00 then
set fSpeed[A] = 0.00
//--//--//
if bLeft[A] == true then
if nLeft[A] >= 25 then
set fFace[A] = fFace[A] + 4.00
else
set fFace[A] = fFace[A] + 2.00
if bRight[A] == true then
if nRight[A] >= 25 then
set fFace[A] = fFace[A] - 4.00
else
set fFace[A] = fFace[A] - 2.00
//--//--//
if fSpeed[A] > 0.00 then
set pointMoveTo[A] = position of unitPlayerUnit[A] offset by fSpeed[A] towards fFace[A]
move unitPlayerUnit[A] to pointMoveTo[A] and make unit face fFace[A]
call RemoveLocation( pointMoveTo[A] )
Leinad said::shock: HOLY COW THATS ALOTA STUFF!!! Uh I might not be a newbe to the world editor but in this case I'm lost! It might be easyer if you just made a map with nothing in it but the trigger and let me download it. But anyway Thanx. I will try to figer it out and hopefully get it to work.
Here is my main quition: Were is the action and what is it called (befor anything is in it) that I need to use. Also does the kind of variable I use mater (I just asummed it was boolean)
Thanx