Advanced I/O Help

  • If you're asking a question make sure to set the thread type to be a question!

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
Hi guys, I have something rather advanced that I'm working on and need a tiny bit of help. Before anyone shuns me for the Minecraft theme, know that I'm just indulging my own intellectual curiosity to see if this idea could be done.

What I'm trying to do is make an animated Creeper that appears to the common TF2 player as something scripted with AI.
This includes:
-Walking on a path.
-Animation for walking.
-Damage player on touch
-Shoot the Creeper to blow up, has set amount of HP.
-Shoot, pauses for 3 seconds, texture blinks, then blows up.
-Entering proximity causes Creeper's head to turn towards the player, and then follow the player until it blows up.
-Leaving proximity of Creeper causes creeper to revert back to his normal path track and stop the head from following the player.
-Explosion causes ground to disappear leaving a whole in the ground.


I feel that most if not all of this is possible, and I've accomplished a lot of it.
The following is what I feel could complete the AI cycle.

Walking Path
Creepers body (not head, or feet) is train and is following a predefined path_track.

Walking Animation
- Animated model.
- Each foot has paths and each foot is parented to the body.

Creeper Hurts on Touch
-I'm sure theirs some parameter or output that will allow the creepers brush/model hurt the player on touch.
4-5. I'm sure theirs some parameter to give the creeper life or hit points. In the output, have "OnBreak, target the creeper, set as Kill or Disable". Add another line for OnBreak, target the name of your env_explosion, and have it start.

Creeper Pauses, Texture Blinks
As for the pause and texture change, I can only think of have the creeper be a model and have two skins. One normal, and one pure white. On shooting or touching, the output changes to an animated texture. This command is on a set delay, then somehow explodes magically. I'm no I/O wizard. :p

Proximity to Creeper
Player enters a *2-3* triggers. Their are 3 triggers, a trigger that attaches itself to the player, and an enter and exit trigger field. When the player enters the trigger field (not exact term), it attaches a trigger to the player. When the player exits the trigger field, the resets the orientation and coordinates of the attaching trigger.

Creeper Follows Player
-Either a track is attached to a player and the creeper follow sit or I'll need to have a bunch of tracks all tied to small square brushes. When a player walks over the tile on the ground, the creeper switches to that tiles track until it reaches the player, or the player leaves. If the player leaves through the exit trigger, it'll reset to it's natural path.

Creepers Head Follows Player
-Okay, if you download the below zip, you'll see exactly what I'm about to explain on how I almost accomplished this. I have a trigger that the player steps on, and an info_target parented to the trigger. When the player walks over the trigger, it attaches itself to the player through an !activator. My goal is to have the Creeper's head turn to the player and follow him through the use of a tank ai targeting entity. I added a custom parameter within the tank targeting entity so that it parents with the head, and this worked fine although the head doesn't follow the player. The trigger does attach to the player, I'm 100% sure it does because I have a brush that's visible that also is parented to the trigger and it attaches to the player. I did this to see if it would attach.






So guys, if you're competent with the more advanced workings of the source engines I/O, could you tell me where I'm going wrong? Could it be parenting? An entity that isn't allowed in TF2? I'm really unsure and need a bit of help.
www.FF6Hacking.com/Creeper.zip


The map will show a model that's missing, it's just TNT. I didn't want to include it as it's not relevant to the Creeper.
 
Last edited:

Jeremy

L11: Posh Member
Oct 24, 2010
829
299
With the creeper's walking animation, I don't see why you'd need the feet to be parented and have path_tracks and stuff when it could easily be a couple of motion tweens in a 3D modelling program.

All I can really think of to say is that what you're trying to do seems really ambitious and probably rather expensive, entity-wise.

EDIT: Woo, 500th post.
 

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
How could I get the head to follow the player? Am I not doing the I/O and parenting right?
 

Jeremy

L11: Posh Member
Oct 24, 2010
829
299
You could probably have another path_track that is also parented to the player, but at head-height of the creeper, and have the creeper's head follow it instead of being parented to the body (when following path-tracks, props and entities will by default face that way, although it might take some tweaking to get it facing the right way). Make sure both entites move at exactly the same speed or the creeper's head will float off.

I'm not entirely sure if this will work since I've never really experimented with this sort of thing properly before, but hopefully...
 
Last edited:

bob+M|M+

L6: Sharp Member
Mar 31, 2008
346
394
I've worked on a similar project and got quite far on it. A small application is definitely possible, but when you start talking about 2+ creepers, multiple players, and terrain that isn't perfectly open, then you run into a lot more problems. Hammer has a lot of limitations. This sort of thing is definitely better through coding.
 

Freyja

aa
Jul 31, 2009
2,994
5,813
path_tracks cannot be parented, full stop. I can't help with much else, but I can tell you that.
 

bob+M|M+

L6: Sharp Member
Mar 31, 2008
346
394
^ this is also a problem, though there are some sneaky ways around this. You can parent an entity to the player, and then use logic_measuremovement to force the path_track to follow the entity that's following the player. A neat little trick from A Boojum Snark!
 

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
Would making the head a "func_physbox" help? I could add an "phys_ballsocket" entity that connects the head to the body. This theoretically would allow the head to rotate freely if it's targeting something. That said, would an "phys_constraint" entity help with making the now rotatable head target the trigger that attaches itself to the player? If the phys_constraint entity can't target a trigger, would an "info_target" help with the targeting between the two?