Player damage in moving objects

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

Moderator: Moderators

Post Reply
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Player damage in moving objects

Post by Grassy »

G'day all, my mate and I are working on a new map that includes a large Paddle Steamer that moves slowly around an island. The river is almost a perfect circle so the boat tends to pivot a little on each node as it follows the info_splinepath.

We expected this to happen but what we didn't expect was the damage done to players on or in the boat. When the boat pivots and a player is near a wall he gets caught up in the wall and takes damage, it also stops the boat from moving.

We have looked high and low for a switch / setting for the walls and other brushes on the boat to stop player damage with no success..

Any help would be greatly appreciated.
Grassy.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

player

Post by tltrude »

Yep, the player models don't like to be moved in a circle. The only way to prevent it is to "glue" the player to a script_origin that you have bound to the boat. This means the player can't move until he is "unglued", but he will still be able to look around.

The script lines would look something like this.

$spot_1 bind $boat
$boat_trigger waittill trigger
local.player = parm.other
local.player glue $spot_1
$boat flypath $island_tour
wait 30
local.player unglue $spot_1

If you start adding more players, it gets more complicated because you wouldn't want them all glued to one spot.
----------------------------------------------------------------

Alternative - Have the boat stand still and make the island rotate! The boat could move sideways safely, So the rotating island would not have to be completly round. Or, you can have more than one island script_object and have them on a loop that takes them past the boat and then underground to go back to the front so they can do it again. Also, if you wanted the boat to move up a river, you can make scrolling river bank textures and moving trees, hills, buildings, ect...

Atomic and I are working on a moving train map ( just like the river idea above). Here is a screenshot.

Image

The train is really standing still, and the station is moving past it. Other things that move past are, a tunnel, trees, a road crossing, a water tower, a train signal, and telephone poles. Also, players that fall or jump off the train die.

Image

Good luck!
Tom Trude,

Image
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

Thanks tltrude, so it's not looking good then huh?
We knew we could glue or bind but that was not what we wanted.
The boat is quite large to allow plenty of room for players to run around on and inside. But if they get near a wall when the boat pivots a little they get hurt big time.. Before we added walls to the hull it was ok, but you had to keep moving or you fell off the boat when it turned :)
I was hoping there might have been a command or property we had overlooked.
Grassy
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

rotate

Post by tltrude »

No comment on the slowly rotating island idea? It would seem the perfect solution. You can even have the shoreline water texture rotate with the island. Add a rocking motion and wake effect to the boat--the players will never know the boat is not moving. You could also use a caulk sky with a blueish gray farplane color.
Tom Trude,

Image
Shuriken1
Corporal
Posts: 28
Joined: Thu Sep 02, 2004 3:05 pm
Contact:

Post by Shuriken1 »

Would it make any difference if you made the walls script_object's and turned them notsolid. Then, create a new brush, the same as the wall and make it a player clip, i.e. give it the player clip texture. I don't know if it would be any different, try it on one wall and see what happens :)
Shuriken1
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post by Grassy »

Wohoo!!! :)
Hey TL that train project looks great, was following your thread re: the pole anim... I'm glad it's you with that dilema... hahah..
As for our map, we had gone a fair way until we thought about working on the boat... This is a simple picture of the map... We have a largish LOD terain with a circular river around an island in the center.
The island has a large Southern USA style house in the middle and the river has the paddle steamer. The map will be TOW and the boat was the objective, gain control of it and keep control for a number of laps of the island and that team wins... :) So you see the rotating island was a good idea but not feasable for this map because players need land access as well.
Anyway to cut a long story short we have sorted the problem, this idea may be cut and pasted into the hints and tips area if you like.
The boat is now bound in place to the water brush, the water brush is like a large disc and this rotates slowly around the island instead. It works like a charm, very little jitter on the boat and no player damage at all.
Your idea of rotating the island gave us the clue to rotate the water brush instead, so THANK YOU very much man...
Grassy
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

hey thats a sweet idea, players would also be swept around in the water volume methinks, that's a LOT better than boat moving... cool deal guys!
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Another way to do it is to make a shader that rotates the texture of the water brush . Look at the clock.shader in the pak0 scripts directory .
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Players

Post by tltrude »

Cool, so the players don't get hurt even though the boat still turns. the same kind of thing could be done by adding an origin brush to the boat object. That would move the center of rotation to the origin brush which would be in the center of the island somewhere.

Because objects can rotate and move at the same time, the origin could be moved back and forth to make the boats path more elliptical.

Anyway, thanks for posting what you did.........I learned something new!
Tom Trude,

Image
fillstar
Corporal
Posts: 33
Joined: Tue Apr 20, 2004 4:43 am

Post by fillstar »

err no lizard

the water is all that moves, the ground under is still stationary so you can still walk on it and not get swept away, the idea is if you fall in the water ya drown so it really wont affect it ... cool idea though....
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

swept away

Post by tltrude »

We had problems with the "swept away" effect too. We solved it by making the terrain around the train NOT SOLID and placing a black textured box with the kill trigger below ground. So, from the perspective of the other players, the guy just vanishes. The guy that dies, just sees blackness.
Tom Trude,

Image
fillstar
Corporal
Posts: 33
Joined: Tue Apr 20, 2004 4:43 am

Post by fillstar »

Yep cool idea i'll remember that one Tom
Post Reply