06-14-2006, 08:55 AM | #1 |
Actors/Movers attached to players
Hi, I'm relatively new to the whole mod scene thing, but ive been working with it for a little while now and have started to make some good progress. I'm trying to figure out how to do something though. I know how to attach actors to movers and all, but im trying to do something slightly different. I'm trying to figure out how to attach something that will stick with/try to follow the players. For instance, i want some bright spots/lights always moving around in the players line of sight to make it looks like they are seeing spots/stars. How would i do such a thing?
Thank you. |
|
06-15-2006, 03:17 AM | #2 |
Re: Actors/Movers attached to players
This is what you need to do once you have the object you want to attach and the player. Notice that I asume you have the object postioned where you want it in relation to the player. object is the thing you want to attach adn player is the player.
Code:
object.SetBase(none); object.SetPhysics(PHYS_None); object.bHardAttach = true; object.setBase(player); A warning though is that you may have to make some extra checking on the client to be shure it is located at the same position as on the server especialy if it can interact with other objects in some way. |
|
06-15-2006, 07:57 AM | #3 |
Re: Actors/Movers attached to players
Where exactly does this code go though? I'm still trying to learn my way around the different classes.
Well aside from that it doesnt like SetBase(player); i assume im not actually supposed to put 'player', but where do i find the name of the player then?
Last edited by Xephonic; 06-15-2006 at 09:22 AM.
|
|
06-15-2006, 02:55 PM | #4 | |
Re: Actors/Movers attached to players
Quote:
just a thought
__________________
"Check out the polygons on jimbob's girlfriend!" killerbyte "Jimbob, you're a god-damned genius" rollingbrass "You are a god among men" Water12356 |
||
06-19-2006, 09:32 AM | #5 |
Re: Actors/Movers attached to players
yeah. in the end i did it through the hud
|
|
Bookmarks |
|
|