PDA

View Full Version : How to have only physics gun



CasGrimes
01-26-2011, 08:05 AM
Hey guys.

I was hoping someone could help me out.
I want my character to only spawn with the physics gun. I was told that this is only possible via unreal scripting a gameInfo class.
The problem is, I have no idea what to do and how to do it :(

Can anyone guide me in to what I have to do to achieve this?

Thank you for your time.

Erne5to
01-26-2011, 12:49 PM
in gameinfo in defaultproperties

defaultinventory(0)=class'weaponclass'

CasGrimes
02-06-2011, 06:13 AM
I have no idea what that means :s
I basically need the mesh to disappear and the other default gun to go completely.
The player will use the physics gun to pick things up still, but I don't want them to have any weapons to shoot or have visible.
Can anyone help me out?

Graylord
02-06-2011, 06:53 AM
The physics gun doesn't have a mesh, does it?

CasGrimes
02-06-2011, 07:38 AM
Oh yeah I forgot that :)
Well I still need the other gun to be removed, any ideas?

Graylord
02-06-2011, 07:45 AM
in gameinfo in defaultproperties

defaultinventory(0)=class'weaponclass'

In the gameinfo file, the default one is UTDeathmatch, you define the starting weapons.

Look for the line mentioned in the quote.

rjmyth
02-06-2011, 08:04 AM
i did already help you out here and seems to be ignored

http://www.3dbuzz.com/vbforum/showthread.php?186840-How-to-have-only-physics-gun

if you need more exact help and are completely new to how the engine works ask :P. and we can give more step by step intructions.

Alienated Phreak
02-06-2011, 11:22 AM
Lol I had the same question of in the support section:

http://forums.epicgames.com/showthread.php?p=27910513#post27910513

CasGrimes
02-06-2011, 02:11 PM
Yeah I have no experience with unreal scripting which was why I was hoping for an alternative method.

@rjmyth - I couldn't find the boolean you mentioned on 3dbuzz so I thought I'd try here :)
@alienated freak - did you end up doing it? I looked at the suggestions on your thread, but I'm still unsuccessful :(

Alienated Phreak
02-06-2011, 03:12 PM
Yes, basically, you goto the UTGame file (UDK\UDK-XXXX-XX\Development\Src\UTGame\Classes\UTGame.uc then you search for "DefaultInventory(0)=class'UTWeap_LinkGun'", then you just replace "LinkGun" with "PhysicsGun" (include the apostrophes, also, it may be "GravityGun" instead).

Thank you Kornswag!:D

rednaz
02-06-2011, 03:19 PM
Yeah I have no experience with unreal scripting which was why I was hoping for an alternative method.

Don't try to take the easy way out. Either learn the language or get a programmer on your team. Oh, and what people have been telling you to do is extremely easy to do even for someone new.

CasGrimes
02-06-2011, 04:31 PM
I found it :)
But it won't let me save the changes :s Any ideas why that is?
Thanks for your help so far :)

Alienated Phreak
02-06-2011, 05:05 PM
Right click on the file, goto properties, and towards the bottom of the properties screen there should be a box that should say "Read Only" beside it, click the box, close the window, and try it again.:)

CasGrimes
02-06-2011, 05:24 PM
Thank you so much :)
Got it to work, thank you to all those who contributed.

rednaz
02-06-2011, 05:28 PM
Right click on the file, goto properties, and towards the bottom of the properties screen there should be a box that should say "Read Only" beside it, click the box, close the window, and try it again.:)

You really shouldn't do this. Make your own class that inherits that class and just make that small change. Altering the base code can lead to complications down the line.