News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Reviews > Nali City > Nali City - Map Making > Level Editing - Advanced

Reply
 
Thread Tools Display Modes
Old 13th Apr 2004, 05:01 PM   #1
Crossfire
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

Crossfire is offline   Reply With Quote
Old 13th Apr 2004, 07:17 PM   #2
Bot_40
Go in drains
 
Bot_40's Avatar
 
Join Date: Nov. 3rd, 2001
Location: York, UK
Posts: 2,911
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."
Bot_40 is offline   Reply With Quote
Old 14th Apr 2004, 02:34 AM   #3
Crossfire
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 02:38 AM.
Crossfire is offline   Reply With Quote
Old 26th Apr 2004, 04:52 AM   #4
KingMango
pwnt
 
KingMango's Avatar
 
Join Date: Feb. 12th, 2004
Location: just another suburbia
Posts: 141
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
KingMango is offline   Reply With Quote
Old 3rd Nov 2004, 06:05 PM   #5
Dennis Grass
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
Dennis Grass is offline   Reply With Quote
Old 4th Nov 2004, 03:02 PM   #6
XepptizZ
What are you lookin at...
 
XepptizZ's Avatar
 
Join Date: May. 17th, 2004
Location: In solitude
Posts: 486
Bases of any kind should've been totally optional IMO, It's just more fun and original to make your own right?
__________________
GreetZ XepptizZ
XepptizZ is offline   Reply With Quote
Old 5th Nov 2004, 01:55 AM   #7
ReD_Fist
Banned
 
ReD_Fist's Avatar
 
Join Date: Sep. 6th, 2004
Location: Michigan
Posts: 1,404
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...............
ReD_Fist is offline   Reply With Quote
Old 6th Nov 2004, 09:11 AM   #8
Dennis Grass
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
}
I just wanted to correct the code.

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.
Dennis Grass is offline   Reply With Quote
Old 23rd Nov 2004, 04:06 PM   #9
Ghost3021
Registered Hobbit
 
Ghost3021's Avatar
 
Join Date: Nov. 21st, 2004
Location: Behind you.
Posts: 586
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>
Ghost3021 is offline   Reply With Quote
Old 24th Nov 2004, 06:04 AM   #10
Dennis Grass
Registered User
 
Join Date: Nov. 3rd, 2004
Location: Germany
Posts: 9
Thumbs up

Quote:
Originally Posted by SoH_Ghost3021
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.
I took a look at your map, SoH. It is just the best way to do get rid of these weaponbases and placing the weapons is very easy. And without any code...I go crazy it's that simple! Thank you very much for this!
Dennis Grass is offline   Reply With Quote
Old 24th Nov 2004, 10:47 AM   #11
Ghost3021
Registered Hobbit
 
Ghost3021's Avatar
 
Join Date: Nov. 21st, 2004
Location: Behind you.
Posts: 586
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>
Ghost3021 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:55 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer