.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > FritzBot
FritzBot A bot for Return To Castle Wolfenstein - by Maleficus Return to Castle Wolfenstein

Reply
 
Thread Tools
ET Headshot Script
Old
  (#1)
BoringMan
Member
 
Status: Offline
Posts: 22
Join Date: Aug 2007
Default ET Headshot Script - 16-08-2007

I notice is has things in there that control the difference in walls/boxes/floors combo and what not...but it only seems to work on a map restart...it never changes randomly during the match. Anyone here know off hand real quick what particular commands would control that part...making it random during the match?

Thanks.
  
Reply With Quote
Re: ET Headshot Script
Old
  (#2)
TomTom
ET Waypointing team member
 
TomTom's Avatar
 
Status: Offline
Posts: 745
Join Date: Jun 2006
Default Re: ET Headshot Script - 17-08-2007

I added to the et_headshot script the random set up to mimic the way the original map controls might be operated at the start of the match by Humans. Two obvious (to me) ways that these might be changed during the match would be (1) a fake toi floor trigger as an event say when a team member gets to the opposite teams doors and (2) after a self-repeating delay using recursive triggering.

If you would like to have a go as a learning experience here are some helpful references;
Scripting Reference by chruker (a quick bible to map scripting)
FritzBot_Buttons_And_Levers the wiki topic by CrapShoot that uses floor triggers. This topic shows a specific example from Adlernest using floor triggers. For your case a bit less is needed (just most of the first half of the topic). The helper ents communicating with the aiscript are not likely needed nor the aiscript changes at the end of the topic. (There are already roam actions at the far ends for health and ammo) The globalaccums (5, 7) used as lockouts in the script might be used differently to lockout changes from re-occurring too soon, allowing at a minimum, time for the changes to take effect.
Other topics that might help are;
Fritzbot_Map_Scripting and Debugging_Script_files. And use /viewpos in the console to determine your position to find coordinates for the origin and calculate values for the mins and maxs extents for the floor triggers.

It is a bit of a stretch as a first go at script file changes but if you make the attempt you may find that you can handle the task and have much fun at the challenge.
  
Reply With Quote
Re: ET Headshot Script
Old
  (#3)
TomTom
ET Waypointing team member
 
TomTom's Avatar
 
Status: Offline
Posts: 745
Join Date: Jun 2006
Default Re: ET Headshot Script - 17-08-2007

Now as for recursively triggering changes the following modifications to the script file work well;
Code:
game_manager
{

    ////////////////////////////////////////////////
    // Initialising

    // When game starts
    spawn
    {

        // Level initialization

        . . .

        wait 1500

        // TomTom random the house
        wait 5000
         trigger game_manager random_setup //6 lines moved into a trigger scriptblock called by this line
    }
    trigger random_setup
    {
        // original 6 lines moved from game_manager spawn
        wm_announce "random setup now!"
        accum 0 random 255
        trigger game_manager random_floors
        trigger game_manager random_walls
        trigger game_manager random_crates
        trigger game_manager random_grates

        //new lines here on...
        wait 15000                //minimum 10+ second delay, increase to taste

        //console cvar to manually stop the recursion, (can still manually change)
        cvar Fritzbot_stop_random abort_if_equal 1

        //warn the player
        playsound sound/world/alarm_01.wav volume 255
        wait 1000
        playsound sound/world/alarm_01.wav volume 2000
        wait 4000
        //recursive call to loop the script block
        trigger game_manager random_setup    //note: infinite recursion is normally dangerous to the stack 
    }
. . .
The script block random_setup will now handle the calls to change the 4 types of barriers. It also checks to see if a new console cvar is set to 1. This is to allow the server sysop to stop the infinite random changes in the playfield. If hosting the game open the console (`) and type /set Fritzbot_stop_random 1 to kill the random barrier changes (manual lever changes still work). Once turned off you have to restart the map to restart random barrier changes.

You can make the changes to a copy of et_headshot.script copied out of the waypoints into fritzbot\maps. You will have to then play using /sv_pure 0 to use the modified scriptfile versus /sv_pure 1 to play with the original waypoints.
BTW If you want to support more than 2 possible script files for the same map that can be done by setting a special built in ET cvar.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com