Page 1 of 5

Scripting questions

Posted: Mon Feb 09, 2004 1:24 am
by HDL_CinC_Dragon
ok, heres the situation...
1 bridge platform consisting of 2 brushes
2 sides each with one switch
Axis side Switch |Bridge| Switch Allies side

how do i make it so that they go from horizontal to vertical? like a real bridge? and if that dosnt work, ill just make one that spins in the center.
Any ideas?

Posted: Mon Feb 09, 2004 1:29 am
by Cheetohs
Wacko's Recycling bin has something along those lines...

http://www.decalattack.com/recyclebin/s ... ames.shtml
click the 'misc' button at the bottom.

if this is what you are asking for.

mp_ambient2

Posted: Mon Feb 09, 2004 10:48 am
by tltrude
This tutorial map also has a one sided draw bridge w/sound--the trigger is in the river.

http://www.alliedassault.com/pafiledb/p ... le&id=2393

Image

Posted: Mon Feb 09, 2004 5:36 pm
by HDL_CinC_Dragon
thnx guys. lol, I completely forgot about the Recycling bin... Sorry wacko

Tom, that pic looks cool, is that a map you made?



After edit----------------------------------------
Wow, thats exactly what i was looking for, thanx C.

Posted: Mon Feb 09, 2004 7:01 pm
by Shortricci
To make a bridge its basicly a rotating_func door.

You make an origin where the bridge goes up like |._ (. is where the origin would go)

You select all the bridge that move and the origin brush and make it a script_object, call it key/value targetname/mybridge

Then make a trigger_use with key/value setthread/bridge

Then in your script put this:

bridge:
$mybridge loopsound lighthouse_run
$mybridge time 10
$mybridge rotateyup -65
$mybridge waitmove
$mybridge stoploopsound lighthouse_run
wait 25
$mybridge loopsound lighthouse_run
$mybridge time 10
$mybridge rotateydown -65
$mybridge waitmove
$mybridge stoploopsound lighthouse_run
wait 1
end

... and your done :)

- Ricci :twisted:

Posted: Tue Feb 10, 2004 12:26 am
by omniscient
someone told me that doors couldnt rotate like that. is this true?

Posted: Tue Feb 10, 2004 12:30 am
by bdbodger
Rotate y? that is a flat spin isn't it . don't you mean x or z . I mean it the script object is from origin to bridge faceing 0 or 180 then you rotate x but if it is 90 or 270 then you rotate z . When you create a script object it's angles are ( 0 0 0 ) .

Posted: Tue Feb 10, 2004 12:36 am
by omniscient
what im saying is i didnt know doors could rotate up and down.

Posted: Tue Feb 10, 2004 4:42 am
by bighoss
You cant use func>rotating_door to make the bridge to rotate up. It doesnt work. You have to use script to make something rotate up or down.

Posted: Tue Feb 10, 2004 5:01 am
by omniscient
Shortricci wrote:To make a bridge its basicly a rotating_func door.
so is he wrong?

Posted: Tue Feb 10, 2004 5:03 am
by bighoss
Yes he is wrong. I've read it a couple times here in the forums. Not sure which threads, but I know its here. I've also tried it, because I wanted to make a secret hatch that lead down to a tunnel in an old project of mine.

Posted: Tue Feb 10, 2004 9:04 pm
by Shortricci
omniscient wrote:
Shortricci wrote:To make a bridge its basicly a rotating_func door.
so is he wrong?
I didnt fully explain myself here then.

What i meant to say is, to make a bridge you basicly use the same tecnique making a func_rotating door, ie, Selecting all the bridge+origin and making it a script object. (if you read my post again, you'll see that said its like a func_rotatingdoor, i said use a script_object!)

As for the x,y,z. I used a script that i found that someone else did, i copied there script entry for it, and for some strange reason y made the bridge turn upside down (barrel role)

So yes, z is the correct term to use.

Hope that clears it up.

- Ricci :twisted:

Posted: Tue Feb 10, 2004 10:07 pm
by bighoss
Shortricci I had no intention on offending you by what I said. I was just trying to tell Omniscient that you can't use rotating_door to make something rotateup. Also the script you put is a good example.

Posted: Tue Feb 10, 2004 10:11 pm
by Shortricci
bighoss wrote:Shortricci I had no intention on offending you by what I said. I was just trying to tell Omniscient that you can't use rotating_door to make something rotateup. Also the script you put is a good example.
You didnt offend me m8 :p

Sorry if i explained it like you thought you had.

Thanks for the compliment.

- Ricci :twisted:

Posted: Wed Feb 11, 2004 12:31 am
by HDL_CinC_Dragon
Shortricci wrote:To make a bridge its basicly a rotating_func door.

You make an origin where the bridge goes up like |._ (. is where the origin would go)

You select all the bridge that move and the origin brush and make it a script_object, call it key/value targetname/mybridge

Then make a trigger_use with key/value setthread/bridge

Then in your script put this:

bridge:
$mybridge loopsound lighthouse_run
$mybridge time 10
$mybridge rotateyup -65
$mybridge waitmove
$mybridge stoploopsound lighthouse_run
wait 25
$mybridge loopsound lighthouse_run
$mybridge time 10
$mybridge rotateydown -65
$mybridge waitmove
$mybridge stoploopsound lighthouse_run
wait 1
end

... and your done :)

- Ricci :twisted:
Umm, where do i write the scripting stuff :oops: :oops: :( :(