Page 1 of 3

Animating

Posted: Sat Jul 24, 2004 12:08 pm
by Dani
At the begining of a map i want four sperate walls to move downwards and then after a the walls have got into place i want four OTHER seperate slabs to move downwards. How would i do this, i guess it is animation.

Posted: Sat Jul 24, 2004 3:24 pm
by Krane
No, this is scripting. You have to turn the brushes into script_objects, give 'em a targetname and move 'em thru script...

Posted: Sat Jul 24, 2004 6:08 pm
by Dani
What script do i have to use, could someone give me an example please???

Posted: Sat Jul 24, 2004 6:44 pm
by Splaetos
if they all move at same time, distance and direction....

give them all a targetname like downwall_1 or whatever name will help you keep them straight in your head....

$downwall_1 time 3
//how slow or fast you want them to move, in seconds i think, the total time it will take to move the distance. You dont strictly need this, but it gives you more control.

$downwall_1 movedown 500
//number is in units, the same measure you see in radiant. This sets where it will move, it does not actualy move it.

$downwall_1 move or $downwall_1 waitmove
//waitmove pauses tha section of the script while it moves the object, move just moves it.

there are other modifiers you can put on them as well, like damage... if you want to move one section then another, you can use waitmove, or you can use a different timing method.

You can also use waypoints and 'moveto' but I havent as of yet, so search for that method if you want to try that.

and of course, each targetname will move as a group, so anything that is moving different, timed different etc, needs a seperate targetname and procedure to move.

Posted: Sat Jul 24, 2004 7:39 pm
by Dani
Thanks!
Does that mean if i want lots of different obejects moving in the same way i can give them all the same targetname, cos in some scripting anguages you can't do this?

Posted: Sat Jul 24, 2004 9:13 pm
by Splaetos
yea you can make as many script_objects move in the exact same manner by giving them the same targetname and making the targetname move

But

Posted: Sun Jul 25, 2004 8:52 am
by tltrude
Actually, you can have as many brushes as you want in an object. Just select all four walls and then make them a single script_object with a single targetname.

But, if you want them to move at slightly different times, they will each need to have their own targetname and movement lines. Timing is done with a "wait" command, and the number of seconds to wait, Ex. "wait 3".

Posted: Sun Jul 25, 2004 10:04 am
by The French Tourist !
If you make more than 1 entity with the same targetname, the script will fail with an error message : "There are more than 1 entity with the same targetname ! This command requires exactly one !"

Posted: Sun Jul 25, 2004 11:29 am
by M&M
well,i tried it b4 and it worked for me .i think it depends on what command ur using
This command requires exactly one !"
!!
maybe some only require one entity .

but if u used krane's way by making all the brushes one entity then it should also work :wink:

Posted: Sun Jul 25, 2004 12:20 pm
by Dani
Could some1 please REALLY quickly make me an exampl map with script file??? If you could i would be VERY grateful cos i can't do it. :(

Posted: Sun Jul 25, 2004 1:18 pm
by M&M
im afraid to do another failure ,so im just gonna watch :wink:

Posted: Sun Jul 25, 2004 2:20 pm
by Dani
What i REALLY don't understand is the programing bit, if someone just gave me a bit of script to copy and paste, to see if it works then i would be very grateful. Also when makin a brush into a script_object do you set it name as this?:

KEY:targetname
VALUE:walldown

Thanks for all your help guys!
Dani

Posted: Sun Jul 25, 2004 2:36 pm
by Mj
Make your brush a script object and add:

Key: $targetname

Value: whatever

And in a script you have that object do something by

$whatever dostuff

eg:

$whatever rotatex 60

and for this you need a trigger, so you can tell whatevet when to move, so make a brush, and make it a trigger_use

Key: setthread
Value: shiny

This will make it so that when u press use whilst in the trigger it will set the thread shiny going:

shiny:

$whatever rotatex 60

end

should make the brush called whatever rotate aound itself :)

Should work... i think

Mj

Posted: Sun Jul 25, 2004 2:52 pm
by Dani
Well thx m8, but what happened was that the block was continusly rotating and it was doing this before i had pressed the use key in my trigger!
Thanks a lot but i didn't really work
Dani

Posted: Sun Jul 25, 2004 2:57 pm
by Mj
hehe i tried :P

I am a mapper, not a scripter (you can probably tell!)

Try going to the recyclebin

http://www.decalattack.com/recyclebin

and look for bridge that is quite good for a learn :)