Two part question about weapons and ladders!
by Luke Griffin · in Torque 3D Professional · 02/27/2011 (2:36 am) · 23 replies
Hi all
I have a too part question, firstly I cant seem to find out where the players spawn weapon is decided. I'm using the game mechanics kit at the moment, so instead of the rocket launcher I am spawning with the Blastergun. I have checked the player.cs in datablocks and in scripts/server as well as the spawn.cs located in scripts/server and I just cant find it. If you click on your player in the world editor I can see the dynamic fields invBlasterAmmo 100000 and invBlasterGun 1 which obviously links in with the allowable inventory items, but only that one is appearing even though there are other items there, so I am guessing that's not where the spawn weapon is decided. I've also looked through the resources and some tutorials and cant seem to find it either.
The second question is in regards to ladders. I know this is a frequent question as its all over the forums, and although some suggestions and applications have been made, they don't quite match the method I would like. I will be removing the third person view for my project and its single player so I am not in the least concerned about player animation, and bots will not be using them. What I would like to do is very old school. In older engines like quake 3, Half Life ect they used a trigger brush called ladder. When the player entered this trigger they could move all around with zero gravity. You could use the forward key to walk up as well and it behaved similar to the world camera in the level editor. The closest I can get to this is a physical zone with zero gravity. however this means when the player is off the floor they experience no resistance or friction meaning they continue drifting when you release the movement keys. Also you cant use the forward button to move up and you move too quickly. Is there a scripting method of maybe making a physical zone that operates like this? I've tried placing a trigger there as well to alter player speed ect but it didn't work and would be a kind of messy way of doing things.
Sorry bout all the questions, "there will no doubt be more in the future" but any help would be appreciated.
I have a too part question, firstly I cant seem to find out where the players spawn weapon is decided. I'm using the game mechanics kit at the moment, so instead of the rocket launcher I am spawning with the Blastergun. I have checked the player.cs in datablocks and in scripts/server as well as the spawn.cs located in scripts/server and I just cant find it. If you click on your player in the world editor I can see the dynamic fields invBlasterAmmo 100000 and invBlasterGun 1 which obviously links in with the allowable inventory items, but only that one is appearing even though there are other items there, so I am guessing that's not where the spawn weapon is decided. I've also looked through the resources and some tutorials and cant seem to find it either.
The second question is in regards to ladders. I know this is a frequent question as its all over the forums, and although some suggestions and applications have been made, they don't quite match the method I would like. I will be removing the third person view for my project and its single player so I am not in the least concerned about player animation, and bots will not be using them. What I would like to do is very old school. In older engines like quake 3, Half Life ect they used a trigger brush called ladder. When the player entered this trigger they could move all around with zero gravity. You could use the forward key to walk up as well and it behaved similar to the world camera in the level editor. The closest I can get to this is a physical zone with zero gravity. however this means when the player is off the floor they experience no resistance or friction meaning they continue drifting when you release the movement keys. Also you cant use the forward button to move up and you move too quickly. Is there a scripting method of maybe making a physical zone that operates like this? I've tried placing a trigger there as well to alter player speed ect but it didn't work and would be a kind of messy way of doing things.
Sorry bout all the questions, "there will no doubt be more in the future" but any help would be appreciated.
#22
There is an area that mentions "liquid type" in the water block properties. It says that water is only defined atm, but if I could define my own that would remove all the water effects, splashing effects from the player and would have the same 1.1 density that holds the player still unless they move, wouldnt that be close to a ladder effect?
Sounds stupid I know, but if anyone has any ideas as to how I would get this to work, I would love to hear them.
Also, thanks for all the help guys! It's not often that you can get so much support when encountering a problem with any form of software or media so thanks a lot for all your suggestions and help so far.
03/02/2011 (6:13 am)
Im just going to try Andy's idea now, although I had some insperation today. What if I didnt get the player to "walk" up the ladder, what if I got them to swim up it insted. The effects that I am looking for ladder wise, are very similar to the effects of swimming. The ability to travel in all 3 dimensions with friction for example. and if you can disable all of the effects of the water, would it be possible to shape a water block to the same size and scale as the current physical box? "I have noticed some problems with the scaling tool"There is an area that mentions "liquid type" in the water block properties. It says that water is only defined atm, but if I could define my own that would remove all the water effects, splashing effects from the player and would have the same 1.1 density that holds the player still unless they move, wouldnt that be close to a ladder effect?
Sounds stupid I know, but if anyone has any ideas as to how I would get this to work, I would love to hear them.
Also, thanks for all the help guys! It's not often that you can get so much support when encountering a problem with any form of software or media so thanks a lot for all your suggestions and help so far.
#23
08/19/2011 (9:01 pm)
I actually did that for a quake 3 level of mine making an invisible water brush and put it on a ladder.
Torque 3D Owner Luke Griffin