Parenting to the Passtime Ball

Penguin

Clinically Diagnosed with Small Mapper's Syndrome
aa
May 21, 2009
2,039
1,484
hey all,

has anyone tried to parent stuff to the passtime ball? I believe its entity name is 'passtime_ball' but when i trigger outputs to have a prop SetParent to that entity name, it... doesn't seem to work?

any advice?

UPDATE: it seems like it thinks the ball's position is the map origin no matter what?
 
Last edited:

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
Are you sure you're parenting to the ball and not something else? I tested parenting in an official passtime map, and the first thing I noticed using ent_text was that the targetname of the info_passtime_ball_spawn entity was "passtime_ball". Once I had changed the name of the ball spawn to something else and given the actual passtime ball its own targetname, I was able to parent stuff to it.
 

Idolon

they/them
aa
Feb 7, 2008
2,105
6,106
I don't think setting parent to just a class name works, even if there is only one of that entity. Like Spud said, use AddOutput to change the targetname of the ball (you can target entities through IO with class names just fine) and then do your setparent.

(Semi-related note, the passtime goal entity can be parented to things, despite not having the keyvalue by default. FGD issue.)
 

Penguin

Clinically Diagnosed with Small Mapper's Syndrome
aa
May 21, 2009
2,039
1,484
I did what was suggested here shortly after posting, to no avail. in order to check WHY this was happening, I had a logic_timer tell "ball" to FireUser1 every quarter second, with ent_messages_draw on. Once it stopped spitting out errors (once the ball entered the trigger that names it), the timer drew a straight line to the origin of the map, rather than to the ball.

However, Spud's account of being able to parent stuff to it is pretty damning, I must have been doing something wrong

Here's what I'm seeing (I also tried setting targetname of !activator, name lack of results):

Note the lines drawing from the trigger and the prop to the origin of the map

bKb2B1j.png


uBaPRxA.png


VpIE4Ax.png
 
Last edited:

Egan

aa
Feb 14, 2010
1,375
1,720
I'm not 100% sure, but I think it's not enough to 'addoutput parentname' to fire the parent/child link between two already-created entities, you would have to also/instead use the SetParent input on the model you want, in this context.

I think that keyvalue 'parentname' allows SetParent to fire automatically on that item being spawned into the world, but otherwise is just a reference and doesn't include functionality (so this would work if the model was only created, for example via a point_template, at the same time the ball was spawned in).