Page 1 of 1
moving model
Posted: Fri Jul 16, 2004 11:27 am
by At0miC
How can I move a model like this:
A tree model is at piont A must move to point B, and if the model is at point B it must start again at point A, and then moving to point b again, all the time.
It sounds silly, but I nee this for my map lol
Anyone who can help me?
Thnx
.
Posted: Fri Jul 16, 2004 12:46 pm
by tsensor
make any small invisible box and bind tree to box
...
and control in scr
maybe this method not work
Posted: Fri Jul 16, 2004 2:44 pm
by blue60007
Make a script object into the tree (model static/tree.tik, thats not it but...) and targetname it $tree
Then make a waypoint at point A, $wayA, and one at B, $wayB
Code: Select all
level.movingtree=1
treeloop:
while(level.movingtree==1)
{
$tree moveto $wayA
$tree waittill movedone
wait 1
$tree moveto $wayB
$tree waittill movedone
wait 1
goto treeloop
}
end
I think that will work. You can always change level.movingtree to 0 to stop the loop.
Posted: Fri Jul 16, 2004 4:04 pm
by At0miC
Thnx bleu
level.movingtree 1 is also the speed I guess? so if I do level.movingtree 2 it will go faster right?
Okay the tree doesn't move yet

, can someone tell me plz in high detal what I must do? with the script etc. and in radiant in steps plz

Im not that good in scripting and targets stuff.
Posted: Fri Jul 16, 2004 5:32 pm
by blue60007
I'm sorry I forgot a bit.
$tree moveto $wayA //sets place
$tree time 5 //time it takes to move
$tree move //GO!
Posted: Fri Jul 16, 2004 5:55 pm
by At0miC
okay np

, so how would the script look like now?
Something like this?? (I suck it scripting)
Code: Select all
level.movingtree=1
treeloop:
while(level.movingtree==1)
{
$tree moveto $wayA
$tree move
$tree waittill movedone
wait 1
$tree moveto $wayB
$tree time 5
$tree move
$tree waittill movedone
wait 1
goto treeloop
}
end
Thnx anyway
Posted: Fri Jul 16, 2004 7:13 pm
by blue60007
level.movingtree=1
treeloop:
while(level.movingtree==1)
{
$tree moveto $wayA
$tree time 5
$tree move
$tree waittill movedone
wait 1
$tree moveto $wayB
$tree time 5
$tree move
$tree waittill movedone
wait 1
goto treeloop
}
end
Just forgot that one thing. Go ahead and try it, won't hurt anything...
Posted: Fri Jul 16, 2004 7:26 pm
by At0miC
hihi almost

, anyway thnx again
but
I putted the script in the *.scr file,
In the editor, I gaved the tree: $tree as targetname, putted at point A a waypoint with the targetname $wayA, and at point B a waypoint with the targetname $wayB.
But It still doesnt work
Or did I forgot to target the tree to $wayA and taget $wayA to $wayB

or was it target $tree to $wayB? hehe
Or what else did I wrong again LOL
thnx

Posted: Sat Jul 17, 2004 2:55 pm
by At0miC
I still dont know what I must do

and to check if this script works, I tried several time in different ways, but the tree doesn't move, plz help

Posted: Sat Jul 17, 2004 4:04 pm
by blue60007

Tltrude?
What is the tree? Static? Script_model?
Posted: Sat Jul 17, 2004 9:38 pm
by At0miC
Ok thnx blue, tltrude helped me out, we also changed the script a bit
At0miC
Posted: Sat Jul 17, 2004 9:55 pm
by blue60007
What'd you end up doing?