![]() |
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Registered User
Join Date: Mar. 18th, 2000
Location: Oslo, Norway
Posts: 4
|
How to make weapons lean on walls (would that include to spawn without weaponbase?)?
Hi all
![]() I want to do what is shown on the screenshot (from a level I did for the original UT) in UT2004. It can be done right? I think that is much more nice looking than the big weaponbase thing. Please help ![]()
|
|
|
|
|
|
#2 |
|
Possibly either with a custom coded weapon base to spawn the weapon at that angle and offset to the side, then just set bHidden = true so it hides the base itself.
Or alternatively it's possible to place the weapons on their own without the bases apparently though this is supposed to cause AI issuses (but epic are yet to back this statement up)
__________________
New Website "Purple Ants's national animal is the giant hourences and its currency is the zlal." |
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Mar. 18th, 2000
Location: Oslo, Norway
Posts: 4
|
Thanks for the answer.
I can't find out how to just place the weapons on their own.. How? Last edited by Crossfire; 14th Apr 2004 at 01:38 AM. |
|
|
|
|
|
#4 |
|
place the weapons base near your intended location
Open the properties. Set cull distance to .00001 clear the mesh field as well Now find the mesh for whatever pickup and lay it against the wall. maybe?
__________________
Regards, King Mango "Do people even learn how to think anymore, or do we just cram test answers into their brains?" -Angel Mapper |
|
|
|
|
|
|
#5 |
|
Registered User
Join Date: Nov. 3rd, 2004
Location: Germany
Posts: 9
|
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 |
|
|
|
|
|
#6 |
|
Bases of any kind should've been totally optional IMO, It's just more fun and original to make your own right?
|
|
|
|
|
|
|
#7 |
|
Just make a new class name under the weapon
then rightclick and edit the propeties of the new named weapon you added. if you can't find any of the things you need to modify ,type this in on the command bar at bottom of editor editactor class=myclassicsniperrifle (or whatever you named it) then just pick your class in "pickups" not "xweaponbase" to the base you add to map. wich is hidden in advanced, Need any help let me know.
__________________
RF out............... |
|
|
|
|
|
|
#8 |
|
Registered User
Join Date: Nov. 3rd, 2004
Location: Germany
Posts: 9
|
Oops. The code I posted was tested careless.
The spawning weapon collides with the world and always gets "pushed away" form BSP (and static meshes?) for about 30 units or so. That made placing them near walls impossible. Here it is fixed and fully automatic (if u like): Code:
//========================================================
// MyxWeaponBase.
//========================================================
class MyxWeaponBase extends xWeaponBase
placeable;
var(PickUpBase) bool bUseCustomSpawn; // allows u to spawn the pickup at a location (and rotation) away from its base
var(PickUpBase) rotator SpawnRotation; // effective if bUseCustomSpawn is True
var(PickUpBase) vector SpawnLocation; // effective if bUseCustomSpawn is True
function SpawnPickup()
{
if( PowerUp == None )
return;
Super.SpawnPickup();
myPickUp.bCollideWorld = False; // stop colliding with world, so spawning near (sure, even inside) walls is possible
if (bUseCustomSpawn == True) // use user input for the pickups rotation/location
{
myPickUp.SetRotation(SpawnRotation);
myPickUp.SetLocation(SpawnLocation);
}
else // synchronize the pickups rotation/location to its base
{
myPickUp.SetRotation(Rotation);
myPickUp.SetLocation(Location);
}
myPickUp.SetPhysics(PHYS_None); // kill rotating animation
bHidden = True; // hide the weaponbase in-game
}
ReDs way has the advantage you can see the weapon inside of UnrealEd. This makes placing them right easy. So you don't have to run the map over and over again to see where the weapon actually spawns. |
|
|
|
|
|
#9 |
|
hey, i already made custom placable weapons for one of my maps, 2on2chizra, its at nali city. theiir in the mylevel package, just load the map and load yours, they extend pickup.
no need for code, realy.
__________________
![]() Add real-time lights to your maps.<RealTimeLights> A checkpoint system for those larger maps.<CheckPoints> An ASMD that can shock stuff underwater.<ASMD-Reduxed> |
|
|
|
|
|
|
#10 | |
|
Registered User
Join Date: Nov. 3rd, 2004
Location: Germany
Posts: 9
|
Quote:
|
|
|
|
|
|
|
#11 |
|
no prob. obviously i wanted my map to be just like the original chizra, so i did the thing.
__________________
![]() Add real-time lights to your maps.<RealTimeLights> A checkpoint system for those larger maps.<CheckPoints> An ASMD that can shock stuff underwater.<ASMD-Reduxed> |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|