Animating

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

Moderator: Moderators

Dani
Sergeant Major
Posts: 113
Joined: Mon Mar 08, 2004 6:45 pm
Contact:

Animating

Post 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.
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

No, this is scripting. You have to turn the brushes into script_objects, give 'em a targetname and move 'em thru script...
Image
Dani
Sergeant Major
Posts: 113
Joined: Mon Mar 08, 2004 6:45 pm
Contact:

Post by Dani »

What script do i have to use, could someone give me an example please???
Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Post 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.
When I am king, you will be first against the wall~
Image
Dani
Sergeant Major
Posts: 113
Joined: Mon Mar 08, 2004 6:45 pm
Contact:

Post 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?
Splaetos
Major General
Posts: 730
Joined: Tue Jan 20, 2004 2:55 pm
Contact:

Post 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
When I am king, you will be first against the wall~
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

But

Post 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".
Tom Trude,

Image
The French Tourist !
Lance Corporal
Posts: 17
Joined: Mon May 17, 2004 11:31 pm
Contact:

Post 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 !"
The French mapping is like the French kiss : the BEST one !
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post 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:
Image
Dani
Sergeant Major
Posts: 113
Joined: Mon Mar 08, 2004 6:45 pm
Contact:

Post 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. :(
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

im afraid to do another failure ,so im just gonna watch :wink:
Image
Dani
Sergeant Major
Posts: 113
Joined: Mon Mar 08, 2004 6:45 pm
Contact:

Post 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
User avatar
Mj
Map Reviewer
Posts: 1394
Joined: Sun Apr 25, 2004 3:36 pm
Location: England

Post 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
ImageImage
Dani
Sergeant Major
Posts: 113
Joined: Mon Mar 08, 2004 6:45 pm
Contact:

Post 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
User avatar
Mj
Map Reviewer
Posts: 1394
Joined: Sun Apr 25, 2004 3:36 pm
Location: England

Post 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 :)
ImageImage
Post Reply