Follow players movement . . ?
Hey guys, I'm currently trying to get some life in this little guy:
http://dl.dropbox.com/u/14645664/hammer.JPG
By letting him shoot bullets (rockets).
There is a model called rocket which is exact the same he's wearing as ammo.
Unfortunately he has no animation, but I can still let him rotate.
I first made a spawner for the bullets.
But I couldn't track these because they are no physics objects.
So now I made a func_tracktrain and parented the rocket to it.
Because I want to rotate the guy later I need to track the rocket/tracktrain so it'll explode and start from the beginning if it hits a wall.
Also I need to know how to let objects rotate (follow) to the players movement.
If anyone knows a solution please answer. (:
I had to set the model to prop_physics_override.
Then suround it by a trigger_once which sets the !acttivator parented to the tracktrain.
yohoat9 wrote:
Can you make a vmf of this if you get it to work? Would be greatly appreciated.
Yes maybe, I'm going to release the map anyways.
Kasc wrote:
Yes, but to do so you need something to target that you can call upon in hammer. If you place the spawn point within a trigger that sets the parent of an info_target to the !activator (making sure the info_target is in the spawn points position then you can use the info_target's position for the players.
Since the rocket the turret shoots, is controlled by a func_tracktrain and func_rotating or func_door_rotating have to target to rotate to, I tried to set the parent of a "path_track" to the !activator when triggered.
But it doesn't seem to work. I tried this with the !activator as the player and with a cube as the !activator.
I also tried it via the target but this wouldn't make any difference anyway.
It would help me too if I had an alternative for the tracktrain.
I tried env_shooter, but it has no target and does no damage . .
The env_laser can follow the player, but I can't make use of this, since it doesn't rotate the source block.
There must be a simple way to create a npc.
That's what is used here: http://www.youtube.com/watch?v=wa6QaGCFWeE
But there is another thing that I need now. A thing, that shoots . . currently it "shoots" via a func_tracktrain but I would need to clear the parent everytime it shoots and get it back to the objekts rotate position so it'll shoot out of the weapon thing again . .
Right now I stoped the objekt (the turret) everytime it shoots.
I'm currently uploading a video for demonstration.
Alternatively, you could use a point_futbol_shooter, parent it to the func_tank, and have it fire at set intervals.
I tried the filter and stuff, but it didn't seem to work.
I could use the !activator, but that could be a cube too.
Or would it work if I create a filter for the cube that won't let him pass ?
But the problem there again would be that the cube gets spawned too.
A last solutuion that I haven't tried yet would probably be to set an "AddOutput" to the activator right where it spawns, but I don't exactly know, how this AddOutput thing works. Something like AddOutput -> !activator -> targetname rocket ?
I suggest taking a look at the VDC for AddOutput, but you're pretty much right.