Forum Archive

Go Back   3D Realms Forums > General Topics > Programming Forum > UnrealED Help
Blogs FAQ Community Calendar

Notices

 
 
Thread Tools
Old 06-14-2006, 08:55 AM   #1
Xephonic
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.
Xephonic is offline  
Old 06-15-2006, 03:17 AM   #2
Parkar

Parkar's Avatar
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.
Parkar is offline  
Old 06-15-2006, 07:57 AM   #3
Xephonic
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.
Xephonic is offline  
Old 06-15-2006, 02:55 PM   #4
jimbob

jimbob's Avatar
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
__________________
"Check out the polygons on jimbob's girlfriend!" killerbyte
"Jimbob, you're a god-damned genius" rollingbrass
"You are a god among men" Water12356
jimbob is offline  
Old 06-19-2006, 09:32 AM   #5
Xephonic
Re: Actors/Movers attached to players
yeah. in the end i did it through the hud
Xephonic is offline  
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:47 AM.

Page generated in 0.08397794 seconds (100.00% PHP - 0% MySQL) with 16 queries

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

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