View unanswered posts | View active topics It is currently Sat Dec 14, 2019 6:43 pm



Reply to topic  [ 51 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
 New coding/mods 
Author Message

Joined: Tue Aug 26, 2008 6:21 pm
Posts: 192
Location: Kansas, USA
Post 
gopostal wrote:
Most coders could care less for wealth but a simple "thank you" means the world.
That's the truth, it feels good knowing that code that I wrote is good enough to be implemented into something else.

I probably don't have time to code much, but if you have any questions, I might be able to help you out.

Good plan with that readme, I hate it when people steal code and don't even bother to give credit to the original author.


Wed Nov 12, 2008 12:48 am
Profile WWW
BANNED

Joined: Mon Aug 11, 2008 10:44 am
Posts: 811
Location: Coos Bay Oregon
Post 
I've been plinking some with your code but I think this is what is messing everything up (this is from the base monsterhunt mod):

Code:
function bool RestartPlayer( pawn aPlayer )   
{
   local NavigationPoint startSpot;
   local bool foundStart;
   local Pawn P;

   if (MonsterReplicationInfo(GameReplicationInfo).bUseLives)
   {
      if( bRestartLevel && Level.NetMode!=NM_DedicatedServer && Level.NetMode!=NM_ListenServer )
         return true;

      if ( aPlayer.PlayerReplicationInfo.Deaths < 1 )
      {
         BroadcastMessage(aPlayer.PlayerReplicationInfo.PlayerName$" has been lost!", true, 'MonsterCriticalEvent');
         For ( P=Level.PawnList; P!=None; P=P.NextPawn )
            if ( P.bIsPlayer && (P.PlayerReplicationInfo.Deaths >= 1) )
               P.PlayerReplicationInfo.Deaths += 0.00001;
         if ( aPlayer.IsA('Bot') )
         {
            aPlayer.PlayerReplicationInfo.bIsSpectator = true;
            aPlayer.PlayerReplicationInfo.bWaitingPlayer = true;
            aPlayer.GotoState('GameEnded');
            return false;
         }
      }

      startSpot = FindPlayerStart(None, 255);
      if( startSpot == None )
         return false;
         
      foundStart = aPlayer.SetLocation(startSpot.Location);
      if( foundStart )
      {
         startSpot.PlayTeleportEffect(aPlayer, true);
         aPlayer.SetRotation(startSpot.Rotation);
         aPlayer.ViewRotation = aPlayer.Rotation;
         aPlayer.Acceleration = vect(0,0,0);
         aPlayer.Velocity = vect(0,0,0);
         aPlayer.Health = aPlayer.Default.Health;
         aPlayer.ClientSetRotation( startSpot.Rotation );
         aPlayer.bHidden = false;
         aPlayer.SoundDampening = aPlayer.Default.SoundDampening;
         if ( aPlayer.PlayerReplicationInfo.Deaths < 1 )
         {
            aPlayer.bHidden = true;
            aPlayer.PlayerRestartState = 'PlayerSpectating';
         }
         else
         {
            aPlayer.SetCollision( true, true, true );
            AddDefaultInventory(aPlayer);
         }
      }
      return foundStart;
   }
   else
      return Super.RestartPlayer(aPlayer);
}


Shrimp created aPlayer as a way to hack around the PRI stuff but I'm having trouble accessing it directly. Most mods that alter inventory simply are ignored as they are coded to look for Player.Player so they just don't see the MH player as a pawn that is alterable. The hard part of this is that some things are default about a player, but some things are hacked and you have to know which is which.
I'm wondering how tough this will be. I looked at Excalibur's MH mod and they didn't directly address the problem either. I emailed a couple of the authors but got no response so I'm kinda swinging in the wind on knowing how to deal with this. It's a lot of trial and error, so if it goes slow it's not that I'm infrequent with my efforts, it's just that there is a lot of testing going on.


Wed Nov 12, 2008 7:43 am
Profile

Joined: Mon Aug 25, 2008 4:43 am
Posts: 7
Location: UK
Post 
<GF>-REX!! wrote:
Good plan with that readme, I hate it when people steal code and don't even bother to give credit to the original author.


I agree completly...

--=BliZz=-- wrote:
here is the destination unreal Monsterhunt version this has a integrated radar http://www.blizz.planetmonsterhunt.com/dumhv5_201.zip


If you could at least ask before de-compiling other peoples code and posting on a public forum, that would be appreciated. This also applies to the MH version of the nexgen controller that you imply is yours.

http://www.planetmonsterhunt.com/nexgen-t139.html

--=BliZz=-- wrote:
here you can download a special version of nexgen its the mh edition you can only find it here and nowhere else http://www.blizz.planetmonsterhunt.com/NexgenMH_201.zip
PS: this version needs to work cause i tested it


B.


Wed Nov 12, 2008 1:11 pm
Profile WWW
Site Admin
Site Admin

Joined: Fri Aug 21, 2009 4:59 am
Posts: 2591
Post 
I have never used NexGen, but I will look into it. :cool:

_________________
Like this site? Consider a donation to help with server costs.


Wed Nov 12, 2008 4:22 pm
Profile WWW
User avatar

Joined: Mon May 19, 2008 5:27 pm
Posts: 248
Location: Other side of your monitor
Post 
Thx Skillz. :)

As for the versions said on here, it makes more sense now. ;)

Btw, sorry if there was any slight deviation from the topic, carry on as usual. :wiggle:

_________________
Image
Image
Image


Wed Nov 12, 2008 8:17 pm
Profile

Joined: Mon Oct 27, 2008 3:51 pm
Posts: 188
Location: London
Post 
I split this thread to make it easier to follow, I agree with GoPostal that the copyright banter was obscuring the view of the rest of the thread.

_________________
Image
Image
Alucard supports derideal


Thu Nov 13, 2008 5:25 pm
Profile
BANNED

Joined: Mon Aug 11, 2008 10:44 am
Posts: 811
Location: Coos Bay Oregon
Post 
Thank you Al.


Thu Nov 13, 2008 8:02 pm
Profile
BANNED

Joined: Mon Aug 11, 2008 10:44 am
Posts: 811
Location: Coos Bay Oregon
Post 
Just a quick update: I'm still working on the pinata mod, but it's getting there. I actually want pinata to be done perfectly because it will be the basis for most code used to deal with monsterhunt. In a nutshell here's the problem:
The following was posted by Azura HERE :

Quote:
If Scorekill isn't being called properly you can try to work around this by using other functions relating to Damage (if player health <=0 AND attacker is a monster then ...). Also, if I remember correctly, Monsterhunt places Playerpawns in one team and monsters in another.[/url]


So you can see that in effect, two entirely different sets of commands have to be issued depending on the team. The reason pinata wont work on a monster killing of you is that Scorekill is not accessed. If I can't figure out a parent class that covers both death by suicide/map and death by the monsters in the MH map, I may have to actually make two mods to get it to work right.

If anyone wants to jump in, please feel free. To a certain extent I am shooting in the dark over how to address this issue best.


Fri Nov 14, 2008 9:57 am
Profile

Joined: Tue Aug 26, 2008 6:21 pm
Posts: 192
Location: Kansas, USA
Post 
This is a mutator, right? I've had issues with this as well, ScoreKill does not work with monsters.

You could use the function, PreventDeath. That's called right before anyone gets killed. MutatorTakeDamage could also be used, just check if the Victim.Health minus ActualDamage is less than or equal to zero.

Theres no need to use two functions, either one should work for both monster deaths and player deaths. Just don't forget to register the mutator with the following line:
Code:
Level.Game.RegisterDamageMutator(Self);


EDIT: If you are doing this in a GameType, function Killed is the one to use.


Mon Nov 17, 2008 12:34 am
Profile WWW
BANNED

Joined: Mon Aug 11, 2008 10:44 am
Posts: 811
Location: Coos Bay Oregon
Post 
I fixed it using preventdeath as a matter of fact. Skillz has had it a couple of days, but I think I'll throw it out for anyone who wants to test it. let me know good or bad ok? :

MHPinataBeta

This is only the beta so please let me know of ANY issues that arise if you test it. Also if you do play around with it, check your log for any errors. If you get some flagged pinata, would you copy it to me? I'm very interested in any accessed nones if they are caused by the mod.

The pinata is limited to monster-caused deaths. This is to keep the BT sections of maps from collecting too many weapons (they will not destroy themselves). My next thing is to add a timer to destroy the weapons so I can include falls and suicides into pinata. This could prove a bit difficult though as timers can screw up the netcode if you do them wrong.

Also the original mod would not pinata a deemer if you had it. I put that back in. If you run it server-side you can configure it via webadmin. It's self-explanatory, you'll see. If you just play offline, it will pinata all items (sans impact hammer).

I will hopefully put out a final in a few days after I see if this part is OK. Thanks you guys if anyone gives it a whirl. Also for clarification, this is NOT my mod originally. I simply altered it to work with the way monster hunt deals with players.


Mon Nov 17, 2008 12:53 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 51 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.

phpBB SEO