Author |
Message |
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Quick Lua Question
I'm trying to say, in Lua,
If bla bla bla then self.target move player view to self.pos
How do I do this?
|
Sat Aug 22, 2009 2:30 am |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Quick Lua Question
What do you mean by that?
Make the view point to the actor, or switch identity to the actor?
|
Sat Aug 22, 2009 2:32 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Quick Lua Question
Move the actor's view to object with Lua's position.
|
Sat Aug 22, 2009 2:33 am |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Quick Lua Question
I mean, make him look at the actor?
|
Sat Aug 22, 2009 2:33 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Quick Lua Question
The script is attached to a MOSRotating. When it is spawned, it makes the closest actor its "target." I want it so that if the "if" line is activated, or whatever you call it, the view of the "target" is moved to the MOSR's position.
|
Sat Aug 22, 2009 2:36 am |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Quick Lua Question
If you're talking about head rotation, that would invlolve wierd and abstract formulas for GetAimAngle. I have one right now I'm releasing wihin 15 minutes, then I could try and help you come up with a formula.
|
Sat Aug 22, 2009 2:38 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Quick Lua Question
No, I mean like the screen view. Not the actor's actual view.
|
Sat Aug 22, 2009 2:38 am |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Quick Lua Question
Well then you should make it an actor so you can switch identity to it. I think that's exactly what the problem is. :o You need to make that an actor, THEN attach that other lua script that would never work to it.
|
Sat Aug 22, 2009 2:42 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Quick Lua Question
Is my method possible without making it an actor?
|
Sat Aug 22, 2009 2:43 am |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Quick Lua Question
Um no, unless you spawned an actor in the position of the MOSR then switched identity to that
|
Sat Aug 22, 2009 2:44 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Quick Lua Question
Alright, that cleared a few things up. Thanks.
|
Sat Aug 22, 2009 2:45 am |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Quick Lua Question
Sure np. Hey fyi, all the images in your sig are not working....(this belongs in a pm)
|
Sat Aug 22, 2009 2:46 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Quick Lua Question
Yeah I know that. I'm waiting for my photo bucket limit to reset. And one of those images are zalo's (a trophy). And I have another idea. Is it possible to kick a human player out of control and move the control cursor to a certain position?
|
Sat Aug 22, 2009 2:52 am |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Quick Lua Question
Not that I know of, seeing (I think) it's hard coded and not a variable. (it = cursor)
|
Sat Aug 22, 2009 2:53 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Quick Lua Question
Okay. But I have another question. In a mision, when you die, your view flies to your (dead) brain. Is that hard-coded or Mission-only Lua?
|
Sat Aug 22, 2009 2:57 am |
|
|
|