Frankenturrets follows you

Avatar
Jade2k8
25 Posts
Posted Jun 05, 2012
Quick question.

I want to create a Frankenturret which tries to reach you instead of moving straigh forward.
As well i would know if you know a way to make it move more quickly or make it "jump" farther than default

Any clue on how to recreate that effect?

Advertisement
Registered users don’t see ads! Register now!
Avatar
Vordwann
767 Posts
Posted Jun 05, 2012
Replied 2 hours later
I think the only way to make that believable would be to modify the source code for the frankenturret: something that nobody in the world but Valve itself has.
Avatar
zivi7
649 Posts
Posted Jun 05, 2012
Replied 1 hour later

I don't know much about Hammer, but couldn't this help?

Quote:
Override Parameters
A list of physics keyvalues that are usually embedded in the model. Format is key,value,key,value,...

https://developer.valvesoftware.com/wik ... onster_box

Avatar
Jade2k8
25 Posts
Posted Jun 05, 2012
Replied 1 hour later
Geez...would have been fun to make theses guys runing after you and self-destruct once they get close enough
Avatar
Skotty
671 Posts
Posted Jun 05, 2012
Replied 11 minutes later
Their AI isn't written to follow someone. You could do this by using npc_enemyfinders and phys_thrusters. They will push the turret in your direction.
Avatar
CamBen
973 Posts
Posted Jun 05, 2012
Replied 2 minutes later
couldn't you fake it by using a func_tank that looks at you, and parented to that is a trigger_catapult, and a frankenturret model?
Avatar
Nacimota
345 Posts
Posted Jun 05, 2012
Replied 21 minutes later

zivi7 wrote:
I don't know much about Hammer, but couldn't this help?

Quote:

Override Parameters
A list of physics keyvalues that are usually embedded in the model. Format is key,value,key,value,...

https://developer.valvesoftware.com/wik ... onster_box

No.

Override Parameters is a prop class keyvalue that allows you to override keyvalues in the model itself (the keyvalues shown in the properties window in Hammer are exposed by the class, not the model).

Before a model is compiled, it is composed of two main parts, the SMD and the QC file. The SMD is simply the mesh data and so forth for the model itself while the QC file is a human-readable script that describes physical properties of the model to the compiler (things like model name, collision model, animations, mass, etc.). In this respect, they are essentially the model equivalent of VMT files.

QC files contain a block called $keyvalues which describes a variety of prop behaviours such as breakability, flammability, explosivity.

You cannot change the way the frankenturret moves by modifying this data because its movement is implemented in the class itself, not in the prop/model.

Avatar
Jade2k8
25 Posts
Posted Jun 05, 2012
Replied 2 hours later
A phys_thruster works ok for speeding up the monster box, but it seems that i cant manage to get it facing the player. I've tried a func tank parented to the Frankenturret, but nothing, as well i've tried to use that npc_enemyfinder entity but it seems it's not doing nothing (maybe im not using it properly..)
Avatar
CamBen
973 Posts
Posted Jun 05, 2012
Replied 5 hours later
no, parent the frankenturret to the tank, and parent the phys_trhuster to the tank also.
Avatar
Vordwann
767 Posts
Posted Jun 05, 2012
Replied 37 minutes later

CamBen wrote:
no, parent the frankenturret to the tank, and parent the phys_trhuster to the tank also.

These all sound like the most ridiculous and disgusting setups in the world.

Avatar
msleeper
4,136 Posts
Admin
Posted Jun 06, 2012
Replied 4 hours later
zivi7 -
You're a certified bro in my book, but stop bullshitting ideas out of your butthole if you have no idea what you're even suggesting.

Jade2k8 -
No. There's no way to accomplish what you are wanting. You can settle for, at best, complete disgusting hacks of the physics systems. But they don't even have any real AI, they just spring kind of randomly. To say they go in straight lines is very generous.

Avatar
Skotty
671 Posts
Posted Jun 06, 2012
Replied 2 hours later

Vordwann wrote:
CamBen wrote:

no, parent the frankenturret to the tank, and parent the phys_trhuster to the tank also.

These all sound like the most ridiculous and disgusting setups in the world.

Doesn't work, func_tank has no physics.

You would need to parent the func_tank to the frankenturret and the phys_thruster at the func_tank (but I don't know if this still transfers the force on the turet).

Avatar
Jade2k8
25 Posts
Posted Jun 06, 2012
Replied 2 hours later
Effectively, func_tank doesn't have any physics, and ataching my Franky to the Tank, does rotate it but it keeps it floating above the ground since it is fixed to a non-physic brush.

Though,ataching the thrust to the Franky does speed it up if it is no parented to the tank but only if it keeps its physics properties.

Damn Wheatley...why you made your cubes so dumb!?

Avatar
ChickenMobile
2,460 Posts
Posted Jun 06, 2012
Replied 2 hours later
I was thinking about scripts... get the angle of the franken-turret, every times it jumps forward, change its' angles to a certain degrees more in the direction of the player... give it a push...
Avatar
josepezdj
2,386 Posts
Posted Jun 06, 2012
Replied 49 minutes later
Yeah! I was about to suggest the same (without the knowledge chickenmobile has got about it ofc! :biggrin:).

I think that if this is finally achieved by func_tanks or whatever other parenting maneuver it would look odd anyway (will modify the moster box natural movement with sudden orientations or floating effect as mentioned...). I think the only good-looking system would be to use scripts. I haven't experimented much with this though but there are some interesting params that maybe could modify its predefined trayectory...

Just an idea:

  1. Get player's angles (position in terms of pitch, yaw, roll )
  2. SetVelocity / SetAngles of the prop_monster_box upon player's position.

That of above can be achieved by triggering a logic_script. Then it would be necessary to fire this logic_script every once in a while by means of math_counter/logic_relays in order to continually update the direction of the monster box.

Avatar
FelixGriffin
2,680 Posts
Posted Jun 06, 2012
Replied 33 minutes later
The Frankenturret could use its thinkscript to always point at the player, then moving forwards would always go towards them.
Avatar
josepezdj
2,386 Posts
Posted Jun 06, 2012
Replied 10 minutes later
Yeah! you're right, it has its own "Entity scripts" and "Script think function" parameters. No need to use a logic_script.

Another possibility would be to disable the Smart Edit and add a Target !player new line?? Don't know if that would be exactly the command, I'm referring to the same one as the trigger_catapults have as "Launch Target".

Avatar
Jade2k8
25 Posts
Posted Jun 06, 2012
Replied 8 minutes later
Ok, im gettin my hands on doing a Squirrel script, i'll tell you if i get any success on this.

But there is also one more thing and I'm a little concerned because pakrat seems to don't have native support for including .nut files.

If i pack my .nut file on the .bsp that i will upload to the Workshop...should it work properly without any extra downloads?

Avatar
Brainstone
401 Posts
Posted Jun 06, 2012
Replied 2 minutes later
The answer is no. your users will have to download it seperately and out it in the right location. That is not due to Pakrat, but the way source works: It loads the scripts before you start any maps.
Advertisement
Registered users don’t see ads! Register now!
Avatar
josepezdj
2,386 Posts
Posted Jun 06, 2012
Replied 1 minutes later

Brainstone wrote:
The answer is no. your users will have to download it seperately and out it in the right location. That is not due to Pakrat, but the way source works: It loads the scripts before you start any maps.

Completetly correct. :thumbup: