Location and rotation?

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Location and rotation?

Postby Cozmo » Sun Jun 10, 07 4:04 pm

Yeah, it's me again. :lol:

There's two things I need, if anyone knows about them.

1. ) Location variable - Is there such a thing? I'm sure I've seen it in the .ini file for MultiDX at one point. I need my class to have a location for a place to teleport to and to remember where it spawned.

2.) Change Rotation - I need this for my class too; I know how to change the rotation in UnrealEd. But as it's under another variable, I'm not quite sure how I'd set it.

I need both of these for a helicopter class I'm making. Not just any helicopter, but it lets you do missions. :wink:

I've been coding it most of the morning. 315 lines of code, so I'm gonna go for a nap or play Halo3 or something away from the computer. :smt095

Thanks in advance! :D
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Dae » Sun Jun 10, 07 6:53 pm

Location is above Rotation in "Movement" in UED. It's a vector variable, so if you want to alter it (e.g. add 5 to Y),

Something.Location += vect(0,5,0);

You can set location via SetLocation(vect(x,y,z));

absolutely the same with rotation... function for setting it is SetRotation
Last edited by Dae on Sun Jun 10, 07 6:53 pm, edited 1 time in total.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Cozmo » Sun Jun 10, 07 9:08 pm

Ah, I should've worded that better. What I meant was the variable that makes something rotate constantly, like the DXLogo. But I've just thought about how I could do that anyway.

And I know how to SetLocation, I just wanted to know if there's such thing as a variable to store a location on, like on MultiDX you can set the location of the bomb in the .ini through some var.

Thanks for the effort though. :)
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Dae » Sun Jun 10, 07 9:34 pm

how does the variable in ini of multidx look like?
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Cozmo » Sun Jun 10, 07 9:44 pm

Dae[A] wrote:how does the variable in ini of multidx look like?


I would've copied the var type, but he protected it. :(

Here's one combination I see from the ini.

MapName[0]=DXMP_Smuggler
BombLocation[0]=(X=306.587524,Y=33.631599,Z=239.800003)

:?
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Dae » Sun Jun 10, 07 10:03 pm

the var type is "vector", obviously

like
var vector MyRotation config(Mymod);

Self.SetRotation(MyRotation);
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Cozmo » Mon Jun 11, 07 3:32 pm

Dae[A] wrote:the var type is "vector", obviously

like
var vector MyRotation config(Mymod);

Self.SetRotation(MyRotation);


Ok, thanks for that Dae. :D
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Allan » Mon Jun 11, 07 4:13 pm

I thought rotation has it's own type of variable - Rotator.
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Dae » Mon Jun 11, 07 4:33 pm

I checked Unreal Wiki — Allan is right.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby MainMan » Mon Jun 11, 07 4:44 pm

~Cozmo~ wrote:What I meant was the variable that makes something rotate constantly, like the DXLogo.

SetPhysics(PHYS_Rotating);
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby Ayleth » Tue Jun 12, 07 2:13 am

~MainMan~ wrote:
~Cozmo~ wrote:What I meant was the variable that makes something rotate constantly, like the DXLogo.

SetPhysics(PHYS_Rotating);

i believe you need another var too, bFixedRotationDir=true. or something like that.
¨‘°ºMåsåmµñ£º°‘¨
˙•●●ĊђασsΪηcǻяйαѓε●●•˙
jason.unger@gmail.com
User avatar
Ayleth
Regular
 
Posts: 313
Joined: Sun Jul 09, 06 7:27 pm
Location: 6 feet under. and trying to get out!

Postby ~ô¿ô~Nobody~ » Tue Jun 12, 07 2:42 pm

Dae[A] wrote:Location is above Rotation in "Movement" in UED. It's a vector variable, so if you want to alter it (e.g. add 5 to Y),

Something.Location += vect(0,5,0);

You can set location via SetLocation(vect(x,y,z));

absolutely the same with rotation... function for setting it is SetRotation

Something.Location += vect(0,5,0);
wouldn't work already.

You needed to do it like
something.Setlocation(vect(something.location.x,something.location.y+5,something.location.z));
Nobody is perfect...
------------------------------
Longc[A]t wrote:I still think Dae is a russian spambot.

~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.

ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
User avatar
~ô¿ô~Nobody~
Alpha
 
Posts: 2520
Joined: Fri Dec 31, 04 3:20 pm
Location: Proclarush Taonas

Postby MainMan » Tue Jun 12, 07 2:47 pm

A better way would be:


local vector loc;
loc = Something.location;

loc.Y += 5;

Something.SetLocation(loc);


:)
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby ~ô¿ô~Nobody~ » Tue Jun 12, 07 2:49 pm

Yes, of course. I just wanted to make it look difficult :P
Nobody is perfect...
------------------------------
Longc[A]t wrote:I still think Dae is a russian spambot.

~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.

ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
User avatar
~ô¿ô~Nobody~
Alpha
 
Posts: 2520
Joined: Fri Dec 31, 04 3:20 pm
Location: Proclarush Taonas

Postby Allan » Tue Jun 12, 07 3:08 pm

Wouldn't
Code: Select all
Something.SetLocation(Something.Location+vect(0,0,5));
work too? :P
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 39 guests