suspension bridge and one time event


(captain_cadaver) #1

hey. couple quick questions.

i’ve kind of put my farm map on the back burner for right now because i ran into a few problems with the texture work (insert grumbling). however, i kind of started working on a map that doesn’t necessarily take place in a real location.

the main feature of it, if i can get it to work, is a rope suspension bridge. now, the main question regarding it is this- when you walk on a crude wood and rope suspension bridge, it is prone to sway slightly, and even twist at times, depending on how you walk across it, etc. now, i’d really like to add that to the map, to make the bridge more believable. would this just be a script mover triggered by a character entering a big ass trigger brush? and is it possible to have two scripts move it, to accomplish both the swaying and the twisting?

secondly, and also pertaining the map, is how does one go about scripting a one time event (for lack of a better term). what i’d really like, ideally, is to set something up so that as the invading team (axis in this case) begins to deploy across the bridge, once half the team or so are on the bridge crossing it, i’d like to have something like a scripted mortar round hit the bridge and split it in half, so that the bridge halves go crashing down towards the cliff edges (indiana jones style, hehe), maybe with ladder brushes in place where the bridge halves would come to rest, with ar iver beneath, so that those who are far enough towards the opposite shore can climb up the remnants of the bridge, but those who lagged behind have to make way through a tunnel. is there a way to do this, making the script work based upon how many players are on the bridge?

thanks


([rD]MrPink) #2

To make it wiggle I would use the func_bobbing and try to make them bob erratically, with a trigger covering the whole of the bridge. Unfortunately, it would not be possible to make it speed up if someone jumped or anything like that.

For the one time event:

1.Create a variable number, call it whatever you want.
2.Set it to 0.
3.Create a condition.
4.Create a response.
5.add a line that checks if the number is 1 or 0, and tell it to skip that part of the script if it isn’t 0.
6.Tell it to add 1 at the end.

Quick example:

bridgescript
{
spawn
{
accum 1 set 0
}

trigger
{
accum 1 abort_if_not_equal 0
//action to take here
accum 1 set 1
}
}


(captain_cadaver) #3

would that be able to be set so that the trigger were x number of players on axis being on the bridge at once? that’s the main question i have about it really. i just thought it’d be a cool dramatic event to have half the team on the bridge, half at the edge watching and blammo, a guy or two gets killed, the bridge is cut in half, and people are sent into the river :wink:


([rD]MrPink) #4

I guess you could use a touchable trigger and have it count and do its thing when it reaches that number go off, but I don’t think it can decide if theres more than one person triggering it.


(captain_cadaver) #5

i’m going to admit i’m not a very good scripter, and have only written the most basic objective scripts before, but would it be possible to just use a series of alarm funtions (…) and once it’s been tripped, a single trigger, like 8 or 10 times or whatever, blammo, it snaps? guess i’m not even sure if that’s possible in scripting.


([rD]MrPink) #6

I guess its possible for it to wait for a few triggers, I don’t see why it woulnd’t be able to… I’ve never tried it though.