Hi,
I'm trying to figure out how to spawn an object in front of the player, and have it "attached" to the player, in the sense that it moves/rotates with the player so that it's always in the same spot in front of you.
My first thought was to modify the CTF flag code, or the shieldbelt effect code, but I can't find the part of the code in either of those classes that keeps the flag attached to the player, or keeps the shield around the player when he moves. Can anybody help me out, or point me in the right direction?
I also noticed a thread on this board recently about creating an object that "orbits" the player, by using PrePivot. This looks promising, but I can't find PrePivot defined in the code either, so I don't really understand what it does. Any help there?
Also, on different note, is it possible to spawn an object and give it the property of being world geometry? For example, weapons like the enforcer and minigun use a trace to determine what they're hitting. If they're hitting a wall (ie. "if ( traceresult == Level )" or something), it spawns the bullet ricochet spark and whatnot (HitWall i think). But is it possible to flag a non-level object with that same property, so that when you shoot it, it also spawns the spark, etc.? Or would I have to write special "HitWall" functions for the object being hit?
Thanks.
I'm trying to figure out how to spawn an object in front of the player, and have it "attached" to the player, in the sense that it moves/rotates with the player so that it's always in the same spot in front of you.
My first thought was to modify the CTF flag code, or the shieldbelt effect code, but I can't find the part of the code in either of those classes that keeps the flag attached to the player, or keeps the shield around the player when he moves. Can anybody help me out, or point me in the right direction?
I also noticed a thread on this board recently about creating an object that "orbits" the player, by using PrePivot. This looks promising, but I can't find PrePivot defined in the code either, so I don't really understand what it does. Any help there?
Also, on different note, is it possible to spawn an object and give it the property of being world geometry? For example, weapons like the enforcer and minigun use a trace to determine what they're hitting. If they're hitting a wall (ie. "if ( traceresult == Level )" or something), it spawns the bullet ricochet spark and whatnot (HitWall i think). But is it possible to flag a non-level object with that same property, so that when you shoot it, it also spawns the spark, etc.? Or would I have to write special "HitWall" functions for the object being hit?
Thanks.
Last edited: