3D Realms Forums

3D Realms Forums (https://forums.3drealms.com/vb/index.php)
-   UnrealED Help (https://forums.3drealms.com/vb/forumdisplay.php?f=20)
-   -   Actors/Movers attached to players (https://forums.3drealms.com/vb/showthread.php?t=18398)

Xephonic 06-14-2006 08:55 AM

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.

Parkar 06-15-2006 03:17 AM

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);

Remeber to turn off all colliding with objects and the level if you don't want it to get stuck on stuff. Moving the object around after you have set the base should now be relative to the player as well.

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.

Xephonic 06-15-2006 07:57 AM

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?

jimbob 06-15-2006 02:55 PM

Re: Actors/Movers attached to players
 
Quote:

Originally Posted by Parkar
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);

Remeber to turn off all colliding with objects and the level if you don't want it to get stuck on stuff. Moving the object around after you have set the base should now be relative to the player as well.

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.

from what i gather, its supposed to be an first person only effect, it would looks rather silly if the people around the person seeing "stars" ( presumably by being stunned or something ) would also see them floating in mid air

just a thought :)

Xephonic 06-19-2006 09:32 AM

Re: Actors/Movers attached to players
 
yeah. in the end i did it through the hud


All times are GMT -6. The time now is 08:11 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.

Website is 1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.