.:: 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
Transmitter question
Old
  (#1)
enigma1
Member
 
Status: Offline
Posts: 58
Join Date: Dec 2007
Default Transmitter question - 13-04-2008

Hello, I have a question about the transmitter script with the antenna rotation after reading the map scripts.

So basically we have 2 helper entities for the antenna. Helper entities 99 and 101. So these 2 entities are linked with actions 4 and 5 and pass the info to the aiscript via the construct commands in the main script.. Ok so actions 4 and 5 then enable and disable action 7, which is an aim to action.

How action 7 is linked to the bots? Is it via the roam actions nearby? (actions 0-3) Is this processed by the fritzbot module automatically? I cannot understand how the bots will perform the aimto action 7 as there is no direct linking to the antenna entity.

Thanks
CK-Chaos
  
Reply With Quote
Re: Transmitter question
Old
  (#2)
TomTom
ET Waypointing team member
 
TomTom's Avatar
 
Status: Offline
Posts: 745
Join Date: Jun 2006
Default Re: Transmitter question - 13-04-2008

The action #7 is being used as a boolean accumulator inside the aiscript. aiscripts do not have accums (storage variables) like map scripts do. But there is enough functionality to set/reset an action and to test-if-reset (note the logic). In the wiki these helper actions generally use the invalid action (but I guess an aim action works too) expressly so that bots do not directly interact with it. Note that no camp links to action 7. That then leaves it to be solely used by the aiscript.

Using a "fake" action as an accumulator is discussed in the wiki in Long_Conditional_Tests_In_Fritzbot_ET#Fake_Actions _as_Binary_Accumulators and one is used in FritzBot_Buttons_And_Levers (action 6).

The bindlestiff states in the map script comments that the fake action etc is to avoid exceeding the 64 keyword limit in one of the action tests.



The way the bots actually interact with the antenna rotate is by stepping on/into the invisible new floor trigger (trigger_multiple) that were added to the map script in the game_manager {spawn{. The associated (target'ed) target_script_trigger connects that to a script block that triggers(turns) the antenna. In the antenna's script block are added the construct the helper_ents. These helper_ents are added invisible func_constructibles. Then in the nav fake construct actions (e.g. action 4) are added someplace out of the way and connected by their entnums to the proper /faketois. These fake constructs are minor constructs that are kept inactive so the bots don't try to build them. Each fake construct has an action block in the aiscript that is processed when ever the script "constructs" the func_constructible. Note that we don't use if_construct_built_... in this script block. We don't have a good way to script the func_constructible's destruct in the map script. So each fake func_constructible acts as just a one-way single event communication with the aiscript. To turn something on as well as off (repeatedly) you need 2 fake func_constructible (func_constructs).
  
Reply With Quote
Re: Transmitter question
Old
  (#3)
enigma1
Member
 
Status: Offline
Posts: 58
Join Date: Dec 2007
Default Re: Transmitter question - 13-04-2008

Hi Tom. thanks for the help. Now I am going to study that page but on the last point you mentioned I need 2 constructibles to turn something on/off?. How about the kill <construct> can this be used same way as with the tank? If I understand this should work (theoretically for the same construct) if it is built or not using the if_construct_built_ check.

I am going to try this actually on a map to see what's going on.
  
Reply With Quote
Re: Transmitter question
Old
  (#4)
TomTom
ET Waypointing team member
 
TomTom's Avatar
 
Status: Offline
Posts: 745
Join Date: Jun 2006
Default Re: Transmitter question - 14-04-2008

I think I tested killing a construct once and if memory serves me well it was a one time only removing the entity. If that is the case any later attempt to use (construct) the entity disconnects ET back to the main menu with a script error. But try it anyway, it is good practice to crash test things (except your own car).
  
Reply With Quote
Re: Transmitter question
Old
  (#5)
enigma1
Member
 
Status: Offline
Posts: 58
Join Date: Dec 2007
Default Re: Transmitter question - 16-04-2008

Hi Tom,

Here is what I see. I created a helper entity pretty standard as the wiki explains. Then I setup an action to be minor construct linked to the TOI (helper_ent_obj). Ok now I add the construct command where the .script signals the .aiscript for the construction and this works no problem. When I kill the entity (and I use kill not remove) I do not see the construct's death method being invoked. I do not have a crash or anything.

I also tried the trigger command to see if it will make a difference the only thing I see is that the method is invoked in this case in the .script but the .aiscript doesn't see it. I tried several things setting up the construct to be constructible_weaponclass 3 as documented but no joy. Of course if I remove it causes a script error as we would expect.

I can post the nodes/scripts if you could help.

Thanks
CK-Chaos
  
Reply With Quote
Re: Transmitter question
Old
  (#6)
enigma1
Member
 
Status: Offline
Posts: 58
Join Date: Dec 2007
Default Re: Transmitter question - 16-04-2008

Seems like the death event can be called only through player actions and not via the .script. That may explain the problem. I was able to trigger it with some damage done during gameplay. I do not see a problem reactivating it in that way.
  
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