UT / Unreal single player gametype issue ...
- FraGnBraG
- Inhuman
- Posts: 930
- Joined: Sun Jun 13, 2010 5:13 pm
- Personal rank: Good news everyone!
- Location: Canada
- Contact:
UT / Unreal single player gametype issue ...
Okay, sorry if this is not the right place to ask this (since it is really an unreal thing)
-=BUT=-
What would you do if you wanted to kill (i.e. not show) the default weapon appearing when you enter a level set to "Unreal Single Player" gametype... ?
Similar i guess to the "Vortex rikers" gametype except having no view rotation...
I did a quick search but could not find anything about this ... I thought i'd ask the brains here first, before I go asking over at UnrealSP or OLDunreal etc..
Thanks in advance
-=BUT=-
What would you do if you wanted to kill (i.e. not show) the default weapon appearing when you enter a level set to "Unreal Single Player" gametype... ?
Similar i guess to the "Vortex rikers" gametype except having no view rotation...
I did a quick search but could not find anything about this ... I thought i'd ask the brains here first, before I go asking over at UnrealSP or OLDunreal etc..
Thanks in advance
- papercoffee
- Godlike
- Posts: 10447
- Joined: Wed Jul 15, 2009 11:36 am
- Personal rank: coffee addicted !!!
- Location: Cologne, the city with the big cathedral.
- Contact:
- FraGnBraG
- Inhuman
- Posts: 930
- Joined: Sun Jun 13, 2010 5:13 pm
- Personal rank: Good news everyone!
- Location: Canada
- Contact:
Re: UT / Unreal single player gametype issue ...
yeah that onepapercoffee wrote:You mean the Dispersion Pistol?
I need to do this because I just split a gigantic SP level into 4 smaller ones. the game starts with vortext rikers gametype but i don't want to do the view rotation whenever i change from one "smaller" level to the next...
Thanks
- Dr.Flay
- Godlike
- Posts: 3347
- Joined: Thu Aug 04, 2011 9:26 pm
- Personal rank: Chaos Evangelist
- Location: Kernow, UK
- Contact:
Re: UT / Unreal single player gametype issue ...
Not sure if UTeamFix has anything that may help. It does extend the base gametypes and tweak SP, amongst many other things.
http://wolf.tcpclan.net/projects/Unreal/UTeamFix.html
http://www.oldunreal.com/cgi-bin/yabb2/ ... 1285952043
http://wolf.tcpclan.net/projects/Unreal/UTeamFix.html
http://www.oldunreal.com/cgi-bin/yabb2/ ... 1285952043
UT99.org House Rules
ChaosUT https://chaoticdreams.org
Your Unreal resources: https://yourunreal.wordpress.com
The UT99/UnReal Directory: https://forumdirectory.freeforums.org
Find me on Steam and GoG
ChaosUT https://chaoticdreams.org
Your Unreal resources: https://yourunreal.wordpress.com
The UT99/UnReal Directory: https://forumdirectory.freeforums.org
Find me on Steam and GoG
- FraGnBraG
- Inhuman
- Posts: 930
- Joined: Sun Jun 13, 2010 5:13 pm
- Personal rank: Good news everyone!
- Location: Canada
- Contact:
Re: UT / Unreal single player gametype issue ...
interesting stuff but unfortunately not what i'm looking for...Dr.Flay wrote:Not sure if UTeamFix has anything that may help. It does extend the base gametypes and tweak SP, amongst many other things.
http://wolf.tcpclan.net/projects/Unreal/UTeamFix.html
http://www.oldunreal.com/cgi-bin/yabb2/ ... 1285952043
I will try scripting something...
*EDIT* Fixed it - Created a new version of VRikersGame where player looks straight ahead and keeps the "no gun yet" state... works
So all is good
Re: UT / Unreal single player gametype issue ...
Default gametype change?
Coop games like my CacusCoopGame detect if a map has the VRikersGame and does that effect, otherwise start normal gameplay.
Just put VRikersGame on the first map as default gametype in LevelInfo, then SinglePlayer in the others.
Then load the maps without a gametype parameter (Open map?game=), doing "Game=" will clear the gametype option on your local URL.
Coop games like my CacusCoopGame detect if a map has the VRikersGame and does that effect, otherwise start normal gameplay.
Just put VRikersGame on the first map as default gametype in LevelInfo, then SinglePlayer in the others.
Then load the maps without a gametype parameter (Open map?game=), doing "Game=" will clear the gametype option on your local URL.
- FraGnBraG
- Inhuman
- Posts: 930
- Joined: Sun Jun 13, 2010 5:13 pm
- Personal rank: Good news everyone!
- Location: Canada
- Contact:
Re: UT / Unreal single player gametype issue ...
There's HigorHigor wrote:Default gametype change?
Coop games like my CacusCoopGame detect if a map has the VRikersGame and does that effect, otherwise start normal gameplay.
Just put VRikersGame on the first map as default gametype in LevelInfo, then SinglePlayer in the others.
Then load the maps without a gametype parameter (Open map?game=), doing "Game=" will clear the gametype option on your local URL.
okay, so where would i put "Open map?game="?
Right now here is my set up:
Example: map1 connects to the map2 using a "favorites teleporter" - map1's exit teleporter URL property is set like this: "olympia102#map2enter?peer". map2 has a teleporter and playerstart (with Tag "map2enter") at the level's spawn point.
The LevelInfo of map2 has GameType set to either "UnrealGameInfo.SinglePlayer", if player has got a gun, or "VRikersFNB" if player still has not got a gun.
All the VRikersFNB.u does is removes the view rotation (set to zero) and does "PlayerWalking" instead of "PlayerWaking". There is no gun by default because VRikersFNB is based on VRikersGame gaemtype. I have to send the player through the first 4 maps with no gun. I needed VRikersFNB because SinglePlayer gametype ALWAYS equips the player with a dispersion pistol.
If my game was structured as the normal unreal campaigns usually are, the player(s) gets a gun pretty much right away so there is no problem, but that's not what i'm doing - player has to pass through the first 4 maps without a gun yet, after a BIG EVENT they will get some guns (but not before!)
Maybe you can show me a better way to do this stuff?
Cheers
Re: UT / Unreal single player gametype issue ...
Try adding this actor to the level, using VRikers in first map and SP on the others.
Code: Select all
class NoWeapons expands Info;
event PreBeginPlay()
{
if ( Level.Game != none )
Level.Game.DefaultWeapon = none;
}
- FraGnBraG
- Inhuman
- Posts: 930
- Joined: Sun Jun 13, 2010 5:13 pm
- Personal rank: Good news everyone!
- Location: Canada
- Contact:
Re: UT / Unreal single player gametype issue ...
well i added this to mylevel in the map#2, adding the actor and then set SinglePlayer as the gametype and still showing a dispersionpistol.Higor wrote:Try adding this actor to the level, using VRikers in first map and SP on the others.
Code: Select all
class NoWeapons expands Info; event PreBeginPlay() { if ( Level.Game != none ) Level.Game.DefaultWeapon = none; }
I think for now i'll just keep the modified gametype until there's a better way ... i'll just continue and try to finish the 4 maps to some sort of beta stage ...
Thanks
-
- Masterful
- Posts: 542
- Joined: Tue Jan 22, 2013 5:23 pm
- Personal rank: Nullified!
- Location: (X) Unable To Locate....
Re: UT / Unreal single player gametype issue ...
I found this code in UnrealShare.u -> VRikersGame.uc
Is this what you are looking for FNB??
Code: Select all
//=============================================================================
// VRikersGame.
//
// no default weapon
//
//=============================================================================
class VRikersGame extends UnrealGameInfo;
event playerpawn Login
(
string Portal,
string Options,
out string Error,
class<playerpawn> SpawnClass
)
{
local PlayerPawn NewPlayer;
NewPlayer = Super.Login(Portal, Options, Error, SpawnClass);
if ( (NewPlayer != None)
&& (NewPlayer.Health == NewPlayer.Default.Health) )
{
NewPlayer.PlayerRestartState = 'PlayerWaking';
NewPlayer.ViewRotation.Pitch = 16384;
NewPlayer.Health = 12;
}
return NewPlayer;
}
function bool RestartPlayer(pawn aPlayer)
{
local bool result;
result = Super.RestartPlayer(aPlayer);
if ( result )
{
aPlayer.Health = 12;
aPlayer.ViewRotation.Pitch = 16384;
}
return result;
}
function int ReduceDamage(int Damage, name DamageType, pawn injured, pawn instigatedBy)
{
// no friendly fire always in coop
if ( (instigatedBy != None)
&& instigatedBy.bIsPlayer && injured.bIsPlayer && (instigatedBy != injured) )
return 0;
return Super.ReduceDamage(Damage, DamageType, injured, instigatedBy);
}
function AddDefaultInventory(pawn PlayerPawn)
{
return;
}
function bool PickupQuery(Pawn Other, Inventory item)
{
if ( item.IsA('DispersionPistol') )
DefaultWeapon = class'DispersionPistol';
return Super.PickupQuery(Other, item);
}
defaultproperties
{
bHumansOnly=True
DefaultWeapon=None
}
- FraGnBraG
- Inhuman
- Posts: 930
- Joined: Sun Jun 13, 2010 5:13 pm
- Personal rank: Good news everyone!
- Location: Canada
- Contact:
Re: UT / Unreal single player gametype issue ...
yes, this is the code I modified to create "VRikersFNB".Rocky wrote:I found this code in UnrealShare.u -> VRikersGame.ucIs this what you are looking for FNB??Code: Select all
//============================================================================= // VRikersGame. // // no default weapon // //============================================================================= class VRikersGame extends UnrealGameInfo; event playerpawn Login ( string Portal, string Options, out string Error, class<playerpawn> SpawnClass ) { local PlayerPawn NewPlayer; NewPlayer = Super.Login(Portal, Options, Error, SpawnClass); if ( (NewPlayer != None) && (NewPlayer.Health == NewPlayer.Default.Health) ) { NewPlayer.PlayerRestartState = 'PlayerWaking'; NewPlayer.ViewRotation.Pitch = 16384; NewPlayer.Health = 12; } return NewPlayer; } function bool RestartPlayer(pawn aPlayer) { local bool result; result = Super.RestartPlayer(aPlayer); if ( result ) { aPlayer.Health = 12; aPlayer.ViewRotation.Pitch = 16384; } return result; } function int ReduceDamage(int Damage, name DamageType, pawn injured, pawn instigatedBy) { // no friendly fire always in coop if ( (instigatedBy != None) && instigatedBy.bIsPlayer && injured.bIsPlayer && (instigatedBy != injured) ) return 0; return Super.ReduceDamage(Damage, DamageType, injured, instigatedBy); } function AddDefaultInventory(pawn PlayerPawn) { return; } function bool PickupQuery(Pawn Other, Inventory item) { if ( item.IsA('DispersionPistol') ) DefaultWeapon = class'DispersionPistol'; return Super.PickupQuery(Other, item); } defaultproperties { bHumansOnly=True DefaultWeapon=None }
*EDIT* FYI -- here is my modified code (which does work):
Code: Select all
//=============================================================================
// VRikersGame - Modified by FNB 2014 DEC 18
//
// no default weapon, no rotation
//
//=============================================================================
class VRikersFNB extends UnrealGameInfo;
event playerpawn Login
(
string Portal,
string Options,
out string Error,
class<playerpawn> SpawnClass
)
{
local PlayerPawn NewPlayer;
NewPlayer = Super.Login(Portal, Options, Error, SpawnClass);
if ( (NewPlayer != None)
&& (NewPlayer.Health == NewPlayer.Default.Health) )
{
NewPlayer.PlayerRestartState = 'PlayerWalking';
NewPlayer.ViewRotation.Pitch = 0;
NewPlayer.Health = 84;
}
return NewPlayer;
}
function bool RestartPlayer(pawn aPlayer)
{
local bool result;
result = Super.RestartPlayer(aPlayer);
if ( result )
{
aPlayer.Health = 84;
aPlayer.ViewRotation.Pitch = 0;
}
return result;
}
function int ReduceDamage(int Damage, name DamageType, pawn injured, pawn instigatedBy)
{
// no friendly fire always in coop
if ( (instigatedBy != None)
&& instigatedBy.bIsPlayer && injured.bIsPlayer && (instigatedBy != injured) )
return 0;
return Super.ReduceDamage(Damage, DamageType, injured, instigatedBy);
}
function AddDefaultInventory(pawn PlayerPawn)
{
return;
}
function bool PickupQuery(Pawn Other, Inventory item)
{
if ( item.IsA('DispersionPistol') )
DefaultWeapon = class'DispersionPistol';
return Super.PickupQuery(Other, item);
}