Hello!
I was just searching the web for a way to get rid of the rotating pickup because I want to lean the weapons on walls, too. So I found this thread. Unfortunately without an answer...
But Bot_40's idea is great and a good point to start. So I did a little UScript for a new xWeaponBase class without rotating pickups.
I know this thread is old and maybe you have already found a way to do it, but anyway, here is how i do it now.
At first goto the
Actor Class browser, highlight
xWeaponBase and click the
New Script button. As package name use
MyLevel so the new class will be stored within your map package. Enter
MyxWeaponBase as name for the new class.
Put the following code into the new class:
//========================================================
// MyxWeaponBase.
//========================================================
class MyxWeaponBase extends xWeaponBase
placeable;
var(PickUpBase) rotator SpawnRotation; // access via the Properties
var(PickUpBase) vector SpawnLocation; // access via the Properties
function SpawnPickup()
{
if( PowerUp == None )
return;
Super.SpawnPickup();
myPickUp.SetRotation(SpawnRotation); // synchronize rotated position of PickUp and Base
myPickUp.SetLocation(SpawnLocation); // synchronize vector position of PickUp and Base (pivot position)
myPickUp.SetPhysics(PHYS_None); // kill this annoying rotation
}
Compile it and the new class
MyxWeaponBase appears in the browser. Place it in your map, set it up as you like and set
Advanced, bHidden to
True so the base cannot be seen in-game. Look at the code, there are two new variables you have to set up manually in the
MyxWeaponBase properties:
Set Pitch, Roll, Yaw of
PickUpBase.SpawnRotation to exactly the same values as in
PickUpBase.Movement.Rotation.
Do the same with the
PickUpBase.SpawnLocation vector values and
PickUpBase.Movement.Location.
(Sorry, this has to be done manually because i just cannot find the corresponding WeaponBase actor via UScript
If someone knows, please post)
So location and rotated location of the spawning weapon will be exactly the same as of the base.
Now it's a little tricky to get the right position of the weapon because you cannot see it in the editor. After setting up
SpawnRotation and
SpawnLocation the pivot location of the spawning weapon is the same as the WeaponBases pivot location. The weapons rotation is also synchronized with the bases rotation. So you can orientate to the WeaponBase. (Just leave the Bases bHidden to true an run your map to check the base and weapon position.)
Ok. It's not fully automatic. But it works (UT2004 v3323).
English is not my mother language. I hope you understand what I wrote.
Greetings
Dennis