Scripting questions

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

Moderator: Moderators

User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Scripting questions

Post 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?
Last edited by HDL_CinC_Dragon on Fri Aug 27, 2004 12:49 am, edited 1 time in total.
Image
User avatar
Cheetohs
Brigadier General
Posts: 569
Joined: Sun Jan 04, 2004 6:01 am
Location: Minnesota
Contact:

Post 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.
.:c|H|EE|TO|H|s|:.
Image
Need a thorough map tester? Shine the Cheetohs signal!
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

mp_ambient2

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

Image
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post 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.
Image
Shortricci
Sergeant Major
Posts: 100
Joined: Tue Jun 03, 2003 6:51 pm
Location: Bolton, England, UK
Contact:

Post 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:
- [V2]Shortricci :: www.v2.org.uk -
ImageImage
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

someone told me that doors couldnt rotate like that. is this true?
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 ) .
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

what im saying is i didnt know doors could rotate up and down.
Image
bighoss
Major
Posts: 276
Joined: Fri Jan 09, 2004 3:34 pm
Location: USA, Ohio

Post 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.
Image
Strive to accomplish great things!!
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

Shortricci wrote:To make a bridge its basicly a rotating_func door.
so is he wrong?
Image
bighoss
Major
Posts: 276
Joined: Fri Jan 09, 2004 3:34 pm
Location: USA, Ohio

Post 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.
Image
Strive to accomplish great things!!
Shortricci
Sergeant Major
Posts: 100
Joined: Tue Jun 03, 2003 6:51 pm
Location: Bolton, England, UK
Contact:

Post 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:
- [V2]Shortricci :: www.v2.org.uk -
ImageImage
bighoss
Major
Posts: 276
Joined: Fri Jan 09, 2004 3:34 pm
Location: USA, Ohio

Post 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.
Image
Strive to accomplish great things!!
Shortricci
Sergeant Major
Posts: 100
Joined: Tue Jun 03, 2003 6:51 pm
Location: Bolton, England, UK
Contact:

Post 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:
- [V2]Shortricci :: www.v2.org.uk -
ImageImage
User avatar
HDL_CinC_Dragon
Brigadier General
Posts: 574
Joined: Mon Dec 22, 2003 8:32 pm

Post 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: :( :(
Image
Post Reply