Data Realms Fan Forums
http://45.55.195.193/

Quick Lua Question
http://45.55.195.193/viewtopic.php?f=73&t=16317
Page 1 of 2

Author:  CaveCricket48 [ Sat Aug 22, 2009 2:30 am ]
Post subject:  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?

Author:  Mind [ Sat Aug 22, 2009 2:32 am ]
Post subject:  Re: Quick Lua Question

What do you mean by that?

Make the view point to the actor, or switch identity to the actor?

Author:  CaveCricket48 [ Sat Aug 22, 2009 2:33 am ]
Post subject:  Re: Quick Lua Question

Move the actor's view to object with Lua's position.

Author:  Mind [ Sat Aug 22, 2009 2:33 am ]
Post subject:  Re: Quick Lua Question

I mean, make him look at the actor?

Author:  CaveCricket48 [ Sat Aug 22, 2009 2:36 am ]
Post subject:  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.

Author:  Mind [ Sat Aug 22, 2009 2:38 am ]
Post subject:  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.

Author:  CaveCricket48 [ Sat Aug 22, 2009 2:38 am ]
Post subject:  Re: Quick Lua Question

No, I mean like the screen view. Not the actor's actual view.

Author:  Mind [ Sat Aug 22, 2009 2:42 am ]
Post subject:  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.

Author:  CaveCricket48 [ Sat Aug 22, 2009 2:43 am ]
Post subject:  Re: Quick Lua Question

Is my method possible without making it an actor?

Author:  Mind [ Sat Aug 22, 2009 2:44 am ]
Post subject:  Re: Quick Lua Question

Um no, unless you spawned an actor in the position of the MOSR then switched identity to that

Author:  CaveCricket48 [ Sat Aug 22, 2009 2:45 am ]
Post subject:  Re: Quick Lua Question

Alright, that cleared a few things up. Thanks.

Author:  Mind [ Sat Aug 22, 2009 2:46 am ]
Post subject:  Re: Quick Lua Question

Sure np. Hey fyi, all the images in your sig are not working....(this belongs in a pm)

Author:  CaveCricket48 [ Sat Aug 22, 2009 2:52 am ]
Post subject:  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?

Author:  Mind [ Sat Aug 22, 2009 2:53 am ]
Post subject:  Re: Quick Lua Question

Not that I know of, seeing (I think) it's hard coded and not a variable. (it = cursor)

Author:  CaveCricket48 [ Sat Aug 22, 2009 2:57 am ]
Post subject:  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?

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/