moving model

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

moving model

Post 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 :P

Anyone who can help me?

Thnx
tsensor
Sergeant
Posts: 52
Joined: Wed Feb 11, 2004 1:25 pm

.

Post by tsensor »

make any small invisible box and bind tree to box

...
and control in scr

maybe this method not work
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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.
Image
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post 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 :D, 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.
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

I'm sorry I forgot a bit. :oops:

$tree moveto $wayA //sets place
$tree time 5 //time it takes to move
$tree move //GO!
Image
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post by At0miC »

okay np :), so how would the script look like now?

Something like this?? (I suck it scripting) :oops:

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
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post 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...
Image
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post by At0miC »

hihi almost :P, 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 :cry:

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 :roll:
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post 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 :oops:
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

:? Tltrude?

What is the tree? Static? Script_model?
Image
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post by At0miC »

Ok thnx blue, tltrude helped me out, we also changed the script a bit :wink:

At0miC
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

What'd you end up doing?
Image
Post Reply