Community News Licensing Documentation Showcase Features Download UDK.com  

Go Back   Epic Games Forums > UDK > Programming and Unrealscript

Reply
 
Thread Tools Display Modes
Old 11-06-2009, 05:50 PM   #11
Valeranth
Junior Member
 
Join Date: Nov 2009
Posts: 15
Default

Quote:
Originally Posted by lcizzle View Post
Look at Development\Src\Engine\GameInfo.uc and Development\Src\Engine\UTGame.uc
The DefaultProperties section at the bottom of UTGame.uc contains pretty much everything you are trying to change.

DefaultPawnClass=class'UTPawn'

Add that to your DefaultProperties section of MyMod.uc and change it to point to your player class.
the only issue with setting the defaultPawnClass is that the NPC are also part of the class. This is something I dont want. Or will this be fixed by modifying the map (havn't messed around with that much)
Valeranth is offline   Reply With Quote
Old 11-07-2009, 08:07 AM   #12
DragonSpawn
Junior Member
 
Join Date: Nov 2009
Posts: 21
Default

Since my question is somwhat related to this: I will post it here.
What I would like to know is where the default player character (mesh) is set. Whenever you run the game in the editor you get some default UT character. So where is this set and how would one go about changing this?
DragonSpawn is offline   Reply With Quote
Old 11-07-2009, 09:32 AM   #13
Gillies
Junior Member
 
Gillies's Avatar
 
Join Date: Nov 2008
Posts: 10
Default

this is stumping me aswell, in my project as a ut3 mod there was a defaultmesh variable in the pawn class, now apparently it isnt in the udk version, and it seems to be ignoreing my familyinfo :S
Gillies is offline   Reply With Quote
Old 11-07-2009, 02:23 PM   #14
lodi
Junior Member
 
Join Date: Nov 2009
Posts: 6
Default

I'm still not getting it...

I followed the tutorial (http://udn.epicgames.com/Three/Devel...ogramming.html) and modified SuperFunGame to add

Code:
defaultproperties {
  PlayerControllerClass=class'MyMod.spPlayerController';
}
and I created spPlayerController.uc

Code:
class spPlayerController extends UTPlayerController;

function AcknowledgePossession(Pawn P) {
  `log("entered AcknowledgePosession");
  Super.AcknowledgePossession(P);
}

event Possess(Pawn inPawn, bool bVehicleTransition) {
  `log("entered Possess");
  Super.Possess(inPawn, bVehicleTransition);
}

function PawnDied(Pawn inPawn) {
  `log("entered PawnDied");
  Super.PawnDied(inPawn);
}

defaultproperties
{
  bBehindView=True
}
and I modified UTGame.ini just in case:

Code:
[Engine.GameInfo]
DefaultGame=MyMod.SuperFunGame
DefaultServerGame=MyMod.SuperFunGame
bAdminCanPause=false
MaxPlayers=32
GameDifficulty=1.000000
bChangeLevels=True
MaxSpectators=2
MaxIdleTime=0.000000
MaxTimeMargin=0.000000
TimeMarginSlack=1.350000
MinTimeMargin=-1.000000
TotalNetBandwidth=32000
MaxDynamicBandwidth=7000
MinDynamicBandwidth=4000
PlayerControllerClassName=MyMod.spPlayerController
bKickLiveIdlers=False
ArbitrationHandshakeTimeout=0.000000
GoreLevel=0
and I still can't see any of my changes in my custom player controller. SuperFunGame is otherwise working fine. What am I missing, and how can I debug a situation like this in the future? Thanks.

Last edited by lodi; 11-07-2009 at 02:26 PM.
lodi is offline   Reply With Quote
Old 11-07-2009, 09:50 PM   #15
SublimeO12
Junior Member
 
Join Date: Nov 2009
Posts: 6
Default

that sounds like pretty much exactly what i've done, which worked for me. you sure you're not seeing those log statements? what are you doing to make sure you're running superfungame, are you passing it in as one of the URL type parameters in the target of a shortcut UDK, or some other way? Maybe you're not actually running superfungame.
SublimeO12 is offline   Reply With Quote
Old 11-08-2009, 12:48 AM   #16
NightRyder
Junior Member
 
NightRyder's Avatar
 
Join Date: Nov 2009
Posts: 28
Default

I'm pretty sure that you cannot add
Code:
defaultproperties {
  PlayerControllerClass=class'MyMod.spPlayerController';
}
to the superfungame.uc file. I say this because you can put ANYTHING there, and it doesn't complain. Thus, it doesn't even pay attention to that.

I don't think the variable PlayerControllerClass is in scope at that point.
NightRyder is offline   Reply With Quote
Old 11-08-2009, 01:52 AM   #17
lodi
Junior Member
 
Join Date: Nov 2009
Posts: 6
Default

SublimeO12: I modified UTGame.ini to set the default game, and when I run it with `udk.exe dm-deck' I do indeed see superfungame logging to the console and playing the 'massacre' message.

NightRyder: Wow, you're right. So where should I be setting it then? Any thoughts why the line in UTGame.ini isn't working?
lodi is offline   Reply With Quote
Old 11-09-2009, 01:51 AM   #18
NightRyder
Junior Member
 
NightRyder's Avatar
 
Join Date: Nov 2009
Posts: 28
Default

Actually I was both wrong and right. I found that setting the defaultproperties there DOES work, but only if you don't write it like that.

does NOT work:
Code:
defaultproperties {
  blah
}
DOES work:
Code:
defaultproperties 
{
  blah
}
UnrealScript is picky? YES
NightRyder is offline   Reply With Quote
Old 11-09-2009, 08:01 PM   #19
lodi
Junior Member
 
Join Date: Nov 2009
Posts: 6
Default

NightRyder: Wow... incredible. You're right, that did it. Thanks!
lodi is offline   Reply With Quote
Old 11-10-2009, 09:06 PM   #20
meathelix
Junior Member
 
Join Date: Nov 2009
Location: Bay Area, CA
Posts: 2

Gamertag: meathelix
Send a message via AIM to meathelix Send a message via MSN to meathelix Send a message via Yahoo to meathelix
Default

In this case, do you want to inherit from UTPawn and UTPlayerController, or inherit from what those inherit from [GamePawn and GamePlayerController]? There's probably some useful functionality in the UT versions, but you're also carrying a lot of baggage if you're trying to start something from scratch, right? I'm just starting down this path myself, and it's something that seems noteworthy.
meathelix is offline   Reply With Quote
Reply

Thread Tools
Display Modes


All times are GMT -4. The time now is 02:32 AM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2009 Epic Games, Inc. All Rights Reserved.
Video Game Voters Network