Did you know? Every one of these messages is hand-typed live, just for you.

UScript: Chat, Questions, Discussion

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: Semfry, ividyon

User avatar jaypeezy
Skaarj Berserker Skaarj Berserker
Posts: 317
Joined: 25 Sep 2010, 04:32

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 11 Jul 2012, 15:30

I have what I think ought be a very simple thing to do. In most hitscan weapons, in the coding section, is there a specific string that dictates fire rate? I'm trying to create a fast-firing version of the ASMD, and modifying the default properties does nothing.

User avatar integration
Skaarj Berserker Skaarj Berserker
Posts: 445
Joined: 01 Sep 2010, 12:37

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 11 Jul 2012, 18:01

How fast weapons shoot depends on how fast their shooting animation is. So you have to tweak some values of a PlayAnim( name Sequence, optional float Rate, optional float TweenTime ) call. TweenTime is the amount of game time the current animation frame is crossfaded to the start frame of the new animation before the animation sequence actually starts. So smaller values make it go faster. Rate says how, fast the animation is played. Bigger values make it go faster. So an ASMD with readjusted primary and secondary fire speed could look like:

Code: Select all

class MyASMD expands ASMD;

function PlayFiring()
{
   Owner.PlaySound(FireSound, SLOT_None, Pawn(Owner).SoundDampening*4.0);
   PlayAnim('Fire1', 0.8,0.04); // instead of PlayAnim('Fire1', 0.5,0.05);
}

function PlayAltFiring()
{
   Owner.PlaySound(AltFireSound, SLOT_None,Pawn(Owner).SoundDampening*4.0);
   PlayAnim('Fire1',1.2,0.04); // instead of PlayAnim('Fire1',0.8,0.05);
}

User avatar jaypeezy
Skaarj Berserker Skaarj Berserker
Posts: 317
Joined: 25 Sep 2010, 04:32

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 11 Jul 2012, 21:55

Ah, I see. Would this be the same with the UT ShockRifle?
[EDIT]: Yes, yes it is... kinda. Simulated function for some reason? Either way, this works and it's awesome. Thanks so much!

bob
Skaarj Lord Skaarj Lord
Posts: 205
Joined: 23 Apr 2011, 02:24
Location: USA
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 02:09

Hello folks , I am trying to create additional monsters to play as in mcoop2 in (unreal 1)

I have created a subclass of of the mcoopmanta class (mcoopFiredragon) , and used the manta11x in the akmcoop mod for layout reference.
I have also created a custom mcoop pawnslist class , and added it to the mcoop.ini file based on the layout of the akmcoop classes.

But i cant make it work in game no matter what i do , I tried spawning the original pawn , and mantas in the level. and joining with the pawns name , It just spawns me as a human .

I basically think(hope) i know what i am doing here, And what i made I think technically should work. But I am very unfamiliar with the workings of mcoop2 and would like to know if there is some trick or guide to making custom classes work as playable monsters.
such as the formatting of class names, specific mcoop2 variables that need to be defined or similar. or in the worst case , if its not possible at all to start with.

Any tips / guides / information?

here is a link to mcoop2 http://hyper.dnsalias.net/dl/MCoop_v2.3-full.exe

here is a link to my attempt at making it work.

https://dl.dropbox.com/u/18734201/unrea ... roblem.zip

Any help would be apeciated im tryng to do this for AAR and her server and she really wants it to happen but im unsure exactly where i went wrong.

User avatar AlCapowned
Skaarj Elder Skaarj Elder
Posts: 1179
Joined: 19 Dec 2009, 22:25

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 02:32

I can play as your classes outside of MCoop2 just like the normal MCoop monsters, so they're probably not the problem. I think you might have to make a login mutator like AKMCoop2 has. Something like this:

Code: Select all

//=============================================================================
// p6MCoopLoginMutator.
//
// MCoop Copyright(c) 2003, Winged Unicorn.
//=============================================================================
class p6MCoopLoginMutator extends MCoopBaseLoginMutator;

function class<PlayerPawn> ModifyLogin(string InName, string DesiredClass, out byte InTeam, out byte PawnType)
{
   local class<PlayerPawn> SpawnClass;

   if ( NextMutator != None )
   {
      SpawnClass = NextMutator.ModifyLogin(InName, DesiredClass, InTeam, PawnType);
      if ( SpawnClass != None )
         return SpawnClass;
   }

   InTeam = 1;

   if ((DesiredClass ~= "p6mcoop.mcoopfiredragon") || (InName ~= "firedragon"))         { SpawnClass = Class'mcoopfiredragon';      PawnType = 11; }
   
   return SpawnClass;
}

function string GetMonsterInfo(int PawnType)
{
   local string result;

   if ( NextMutator != None )
      result = NextMutator.GetMonsterInfo(PawnType);

   if ( PawnType == 11)               result = result @"- mcoopFiredragon";
   
   return result;
}


You might need a custom gametype like AKMCoop, too. I never got far when I messed with MCoop before, so I'm not sure if this will work.

bob
Skaarj Lord Skaarj Lord
Posts: 205
Joined: 23 Apr 2011, 02:24
Location: USA
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 04:13

well that was very helpful, But adding that loginmutoter to the list of them didnt seem to do anything.

I tried quickly to make a custom gametype , that had a simply check that returned th num for the pawn name but akmcoop is based off of mcoop.u aparently and wont compile at all due to the superclass being deleted in the file.

Then i tried building it off the mcoop2.mcoopgame (which is what im using to play anyway ) it compiled fine and ran fine , made no difference at all. and it still wont let me use the class...

User avatar Jigoku
Skaarj Warlord Skaarj Warlord
Posts: 959
Joined: 03 Dec 2010, 00:51
Location: The Backrooms
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 05:13

You don't need a loginmutator, that's already taken care of. All I just want is to be able to play as Pack6 monsters by adding them to the MCoop2.ini pawnslists. Look at the AKMCoop2's code, that should help you, like giving you guys an idea how it's put together y'know.
Trying to get back into the swing of things.

User avatar AlCapowned
Skaarj Elder Skaarj Elder
Posts: 1179
Joined: 19 Dec 2009, 22:25

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 05:39

The login mutator is needed because it gets information about the name the player needs to have to be a certain monster. I got it to work, I just need to adjust one something. In MCoop2.ini, you need to put p6mcoop.p6PawnsList (like you already had), and you need to add LoginMutators=p6mcoop.p6LoginMutator near similar lines. I'll upload what I have once I'm done. Now that I know what to do, I might work on some new MCoop pawns, too.

Edit: http://depositfiles.com/files/50bgwx43k

Let me know if there are any problems. I only tested it on a LAN game.

User avatar Jigoku
Skaarj Warlord Skaarj Warlord
Posts: 959
Joined: 03 Dec 2010, 00:51
Location: The Backrooms
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 06:32

I want to be able to play as all of p6 monsters, not just firedragon. :/
Trying to get back into the swing of things.

User avatar AlCapowned
Skaarj Elder Skaarj Elder
Posts: 1179
Joined: 19 Dec 2009, 22:25

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 06:33

It's the only monster in the file bob uploaded.

bob
Skaarj Lord Skaarj Lord
Posts: 205
Joined: 23 Apr 2011, 02:24
Location: USA
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 06:35

I downloaded the version you fixed,
What exactly did you change to make it work , i see no obvious changes to the file(s) Becuase i need to know so i can add another bunch of classes properly if i can get this to work.

i cant get it to work at all still. Here is the ini file im using.

[spoiler][MCoop2.MCoopGame]
MaxSuicides=10
GameMutator=MCoopMutator2.Coop
CommandsMutator=MCoopMutator2.MCoopCommands
bSpawnInTeamArea=False
bNoTeamChanges=True
FriendlyFireScale=0.000000
MaxTeams=2
GoalTeamScore=0.000000
MaxTeamSize=16
bNoMonsters=False
bHumansOnly=False
bCoopWeaponMode=False
bClassicDeathmessages=False

[MCoopMutator2.GameMutator]
AdvancedNetwork=(bOptimizeMaxPlayers=False,bOptimizeConnection=False,ServerUploadSpeed=16000,DefaultMinClientRate=2600,DefaultMaxClientRate=10000)
AdminPassword=111
AdminChildPassword=
AdminBabyPassword=
GamePassword=
MaxFailedAdminLogins=5
bSafeAdmins=True
AdminName=Admin
PlayerOptions=(bDenyNameChange=False,bSetDefaultInventory=False,bSetDefaultHealth=False,bSetDefaultInvCharge=False,bSetDefaultAmmo=False)
bSpecialEffects=True
bAlwaysPickUp=False
bAlwaysReconnect=True
RespawnOptions=(bRespawnAmmo=False,bRespawnHealth=False,bRespawnInventory=False,bRespawnWeapon=False,RespawnTimeAmmo=2.000000,RespawnTimeHealth=10.000000,RespawnTimeInventory=5.000000,RespawnTimeWeapon=1.000000)
pawnsLists[0]=MCoop2.PawnsList
PawnsLists[1]=p6mcoop.p6PawnsList
PawnsLists[2]=
PawnsLists[3]=
PawnsLists[4]=
PawnsLists[5]=
PawnsLists[6]=
PawnsLists[7]=
PawnsLists[8]=
PawnsLists[9]=
bCustomMapList=False
LoginMutators=p6mcoop.p6LoginMutator

[MCoopMutator2.Coop]
LoginMutators=MCoopMutator2.CoopLoginMutator
LoginMutators=p6MCoop.p6MCoopLoginMutator

[MCoopMutator2.MonsterCoop]
LoginMutators=MCoopMutator2.MCoopLoginMutator
LoginMutators=p6MCoop.p6MCoopLoginMutator

[MCoopMutator2.DM]
LoginMutators=MCoopMutator2.DMLoginMutator
LoginMutators=p6MCoop.p6MCoopLoginMutator[/spoiler]

To avoid the it not loaded yet problom ,
i edited a map and added both the original pawn and a monsterplayerstart set to type 11.

edit : AAR you need to have patients. I know it hard lol

edit again: do i have to use that custom gamtype?
Last edited by bob on 14 Jul 2012, 08:35, edited 2 times in total.

User avatar AlCapowned
Skaarj Elder Skaarj Elder
Posts: 1179
Joined: 19 Dec 2009, 22:25

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 06:41

The login mutator should be p6MCoop.p6LoginMutator. I changed the p6MonsterCoop class so that it is a subclass of MonsterCoop, like AKMCoop2 is, and I switched the name that the player should use to firedragon.

Edit: I only had to add the pawns list and login mutator for it to work for me. I don't think the custom gametype is needed.

These are some of my settings:[spoiler]

Code: Select all

[MCoopMutator2.MonsterCoop]
bNoEndingMap=False
bMonstersCanEnd=False
MonstersFragLimit=0
AdvancedNetwork=(bOptimizeMaxPlayers=True,bOptimizeConnection=True,ServerUploadSpeed=16000,DefaultMinClientRate=2600,DefaultMaxClientRate=10000)
PlayerOptions=(bDenyNameChange=False,bSetDefaultInventory=False,bSetDefaultHealth=False,bSetDefaultInvCharge=False,bSetDefaultAmmo=False)
bAlwaysPickUp=True
bAlwaysReconnect=True
RespawnOptions=(bRespawnAmmo=False,bRespawnHealth=False,bRespawnInventory=False,bRespawnWeapon=False,RespawnTimeAmmo=2.000000,RespawnTimeHealth=10.000000,RespawnTimeInventory=5.000000,RespawnTimeWeapon=1.000000)
PawnsLists[0]=MCoop2.PawnsList
PawnsLists[1]=AKMCoop2.AKPawnsList
PawnsLists[2]=MCBetaMonsters.BetaPawnsList
PawnsLists[3]=p6mcoop.p6PawnsList
PawnsLists[4]=
PawnsLists[5]=
PawnsLists[6]=
PawnsLists[7]=
PawnsLists[8]=
PawnsLists[9]=
LoginMutators=MCoopMutator2.MCoopLoginMutator
LoginMutators=AKMCoopMutator2.AK2LoginMutator
LoginMutators=p6mcoop.p6LoginMutator
[/spoiler]

bob
Skaarj Lord Skaarj Lord
Posts: 205
Joined: 23 Apr 2011, 02:24
Location: USA
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 06:55

ok yeah derp nameing mistake there on my part lol

i guess it needs the custom game to work that would be fine i can combine them later
,so i tried to start the game and it crashes and give this error

[spoiler]Log: Loading: Package p6mcoop
Warning: Class p6mcoop.p6MonsterCoop is not a child class of Class Engine.GameInfo.®
Critical: appError called:
Critical: Class p6mcoop.p6MonsterCoop is not a child class of Class Engine.GameInfo.®
Critical: Windows GetLastError: The operation completed successfully. (0)
Exit: Executing UObject::StaticShutdownAfterError
Critical: UObject::SafeLoadError
Critical: UObject::StaticLoadClass
Critical: InitGameInfo
Critical: UGameEngine::LoadMap
Critical: LocalMapURL
Critical: UGameEngine::Browse
Critical: ServerTravel
Critical: UGameEngine::Tick
Critical: UpdateWorld
Critical: MainLoop
Exit: appExit[/spoiler]

to me is seems it tring to read a obfuscated name and having a fit.
are you using a differnt version of mcoop then i have?
That would explain a lot...
Last edited by bob on 14 Jul 2012, 08:37, edited 2 times in total.

User avatar AlCapowned
Skaarj Elder Skaarj Elder
Posts: 1179
Joined: 19 Dec 2009, 22:25

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 06:57

That's weird. I got MCoop2 from Hyper's site a long time ago. I don't see why that would cause a problem, since both of our settings are for MCoop2.

Edit: Actually, I have MCoop2.3. You might have an older version or something. My MCoop is for Unreal Gold, but I don't see why that would matter.

User avatar Jigoku
Skaarj Warlord Skaarj Warlord
Posts: 959
Joined: 03 Dec 2010, 00:51
Location: The Backrooms
Contact:

Subject: Re: UScript: Chat, Questions, Discussion

Post Posted: 14 Jul 2012, 07:04

If you guys get this to work I'd want to give you guys a huge cake. No lie. And PLEASE don't forget monsterstarts.
Trying to get back into the swing of things.

Previous Next

Who is online

Users browsing this forum: No registered users and 81 guests

Copyright © 2001-2024 UnrealSP.org

Powered by phpBB® Forum Software © phpBB Limited