New PropHunt for UT99

Discussions about GameTypes
User avatar
Gustavo6046
Godlike
Posts: 1434
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Resident Wallaby
Location: Porto Alegre, Brazil

Re: New PropHunt for UT99

Post by Gustavo6046 » Tue Jun 19, 2018 11:48 pm

(part of this I told earlier on the UnrealKillers Discord)


An actor must be attached to the bot (if you want I may hand you AttachInfo code). This actor will detect every hider bot around it that moves such that VSize(enemy.velocity) > 50 or some other value. If so, then it registers an inventory subclass called FoundEnemy with a var Pawn Enemy; set to enemy.

Then, the function AssessBotAttitude in your gametype's code (PropHunt I believe?) should return super(TeamDeathmatchPlus).AssessBotAttitude(other) if the assessor bot has a FoundEnemy inventory with its Enemy equal to other; otherwise return ATTITUDE_Ignore (IIRC that's what it's called).

You should also add pathing to your maps, and add quite some random dummy inventory items (LookupSpot - we can also use them for the hider AI!) at key locations (that do nothing and call their own Destroy() function when picked up) with high maxDesireability, so that bots actually wander around.

Finally, to get hider bots to actually hide, I advise using a subclass of the same dummy inventory, but with bInstantRespawn set to True, so that it will always be there, and make it in the code so that:
  1. The hider bot gets into an area that has hiding spots. Every area with any amount of hiding spot inventory actors around should have a big LookupSpot actor, which you make it so that it triggers every hiding spot that is visible, and in a radius set by the mapper, as long as the triggerer is in the Hider team.
  2. Every triggered hiding spot inventory will become activated on Trigger() and deactivated on UnTrigger().
I can help a bit. I will give a good base for your code (obviously not tested, but I bet you can do a better job than me :) ).

Hiding spot dummy inventory code:

Code: Select all

class HidingSpot extends LookupSpot;

var int triggerValue;

function Trigger()
{
    triggerValue++;
    UpdateTriggerActivity();
}

function UnTrigger()
{
    triggerValue--;
    UpdateTriggerActivity();
}

function UpdateTriggerActivity()
{
    if ( triggerValue > 0 && !IsInState('Inactive') )
        GoToState('Inactive')
        
    else if ( IsInState('Inactive') )
        GoToState('PickUp')!
}

event PostBeginPlay()
{
    super(Inventory).PostBeginPlay();
}

State Inactive
{
	ignores Touch;
    
    BeginState()
    {
        maxDesireability = 0;
    }
    
    EndState()
    {
        maxDesireability = class.default.maxDesireability;
    }
}
Look up spot trigger code:

Code: Select all

class LookupSpotTrigger extends Actor;

function bool IsHider(Actor Other)
{
    return PlayerPawn(Other) != None;
    // TO-DO for Zac: add code to check the player is a hider. I don't know your gametype code :(
}

event Touch(Actor Other)
{
    local HidingSpot HS;

    super.Touch();
    
    if ( IsHider(Other) )
        foreach VisibleRadiusActors(HidingSpot, HS, HideSpotRadius)
            HS.Trigger();
}

event UnTouch(Actor Other)
{
    local HidingSpot HS;

    super.UnTouch();
    
    if ( IsHider(Other) )
        foreach VisibleRadiusActors(HidingSpot, HS, HideSpotRadius)
            HS.UnTrigger();
}
Look up spot code:

Code: Select all

class LookupSpot extends Inventory;

var() float HideSpotRadius;

event PostBeginPlay()
{
    super.PostBeginPlay();
    Spawn(class'LookupSpotTrigger');
}

state Activated
{
	function BeginState()
	{
		Destroy();
	}
}
"Everyone is an idea man. Everybody thinks they have a revolutionary new game concept that no one else has ever thought of. Having cool ideas will rarely get you anywhere in the games industry. You have to be able to implement your ideas or provide some useful skill. This also applies to mod authoring. If you become a skilled or notable mod author, you will find people propositioning you to implement their ideas. Never join a project whose idea man or leader has no obvious development skills. Never join a project that only has a web designer. You have your own ideas. Focus on them carefully and in small chunks and you will be able to develop cool projects."

Weapon of Destruction

User avatar
'Zac
Experienced
Posts: 111
Joined: Tue Jul 29, 2014 9:35 pm
Personal rank: Who knows.
Location: NC

Re: New PropHunt for UT99

Post by 'Zac » Wed Jun 20, 2018 5:18 am

Yes, I've been thinking about the AI and there are a lot of ways to get something going with prop hunt.

I finished a new beta version that's working well with servers ( yay ) and is running how I want it to.
My public server is running this new beta version for everyone to preview. No redirect yet, the current map is a small test map and the mod itself is less than 5 megabytes.

Other notes:
- Made scoreboard to show the variable amounts for healths, roundtime, hidetime, etc
- Moved HUD round-timer to the right of the screen, included round number
- Created a function to restart players at the end of each round instead of restarting the whole map.
- Hunters are now spectating during HideTime. They cannot see the hiders or their props during this time. When HideTime is over, they respawn.
- Added message at beginning of every round telling player whether they are a Hider or a Hunter.
- Revamped the death notifications ( ..found by.. and ... was too trigger happy ) to appear in red and underneath ' you killed ' messages.
- Bots now spawn in on multiplayer
- Corrected proxy and replication info for actors
- Revamped the RestartPlayer / respawn player function to ensure a good/ non-glitchy spawn.

Thank you everyone for the help so far, this project's end is coming closer and closer and I have learned a ton.
https://www.moddb.com/mods/prophunt-for ... -11-latest
Image
Prophunt for UT99!!!
Image
Github

User avatar
'Zac
Experienced
Posts: 111
Joined: Tue Jul 29, 2014 9:35 pm
Personal rank: Who knows.
Location: NC

Re: New PropHunt for UT99

Post by 'Zac » Fri Aug 03, 2018 10:33 pm

Hey guys, long time no see for a while.
Released another version with some small tweaks to scoreboard and game, redirect files included along with an INI file.

https://www.moddb.com/mods/prophunt-for ... 125-latest

I've picked up a couple new projects, one being a big hobby project another being an internship project so I will not update PropHunt for UT99 for a while, not unless I get contact about any bugs, glitches, and other needed fixes. I have this server of mine up and running with latest version, through still no redirect is there any public FTP i can use for UT? thank you all again for any help, ideas, and feedback; was a great project to work on and I learned a ton.

Image
Prophunt for UT99!!!
Image
Github