.:: 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 > Waypoint Forum
Waypoint Forum A place to request waypoints for a specific map, or to check on the progress of waypoints for your favorite maps.

Reply
 
Thread Tools
A few clarifying scripting questons
Old
  (#1)
the bindlestiff
Member
 
the bindlestiff's Avatar
 
Status: Offline
Posts: 280
Join Date: Nov 2005
Location: Washington state
Default A few clarifying scripting questons - 11-01-2006

I have a few questions about the scripting system to help clarify in my mind what I can and cannot do so I can utilize the flexibility of the script to best advantage. Things got a bit confused when trying to nail down the scripting bug the last few days.

1. "Active forever" actions have a normal Goal Tracker Group ID and turn on when the Goal Tracker reaches that number. However once turned on, the Goal Tracker has no further effect on them. But they can be toggled on/off from within the script.
No question: Mal has already said that this is correct. I included it in this list to be complete.

2. Actions which are to be turned on/off in the script independently of the Goal Tracker must have a Group ID of "-1."
Question: any other conditions apply to this?

3. Mal's tips indicate that "ANY action can be turned on/off with the script."
Question: if a Goal-Tracker action has been turned on or off by the Tracker and you then kill it with the script, will it stay off when the Tracker tries to activate it again?

4. "If_obj_home_true/false" conditionals can only be used from within a steal action.
Question: does the action referenced by the conditional have to be the script test action or can it be a different steal action?
For example:
action x (a steal action)
{
if_obj_home_true y (a different steal action)
.................
}

5. "If_action_true/false" conditionals can only be used from within a dynamite test action.
Questions: is this correct? Can it reference other objective actions other than dynamite actions?
For example:
action x (a dynamite action)
{
if_action_true y ( a different dynamite action, steal, or spawn flag action)
............
}

Last edited by the bindlestiff; 11-01-2006 at 03:45..
  
Reply With Quote
Re: A few clarifying scripting questons
Old
  (#2)
Maleficus
Member
 
Maleficus's Avatar
 
Status: Offline
Posts: 1,054
Join Date: May 2004
Location: Planet Earth
Default Re: A few clarifying scripting questons - 11-01-2006

1. Correct.

2. If you want the action to stay on forever once "turned on" you'll also need to have its "active forever" flag set, otherwise it will only stay on until the goal tracker next increments.

3. The script kills actions by setting its goal group to -1, so it will NEVER be valid again unless you turn it on in the script.

4. For now, its the steal action that called the script. I may expand this later if its needed, but at the time of design, the default maps didn't need it, so it was never added. I may end up adding this either way, because it could be useful in ET.

5. Flag tests and true/false tests can be called anywhere. A true/false test just checks to see if an action is still a valid action, or not. If its in group -1, or any number that is less than the current goal group, its considered invalid/completed/etc. If its >= the current goal group, it will return true.

Cheers!







Quote:
Originally Posted by the bindlestiff
I have a few questions about the scripting system to help clarify in my mind what I can and cannot do so I can utilize the flexibility of the script to best advantage. Things got a bit confused when trying to nail down the scripting bug the last few days.

1. "Active forever" actions have a normal Goal Tracker Group ID and turn on when the Goal Tracker reaches that number. However once turned on, the Goal Tracker has no further effect on them. But they can be toggled on/off from within the script.
No question: Mal has already said that this is correct. I included it in this list to be complete.

2. Actions which are to be turned on/off in the script independently of the Goal Tracker must have a Group ID of "-1."
Question: any other conditions apply to this?

3. Mal's tips indicate that "ANY action can be turned on/off with the script."
Question: if a Goal-Tracker action has been turned on or off by the Tracker and you then kill it with the script, will it stay off when the Tracker tries to activate it again?

4. "If_obj_home_true/false" conditionals can only be used from within a steal action.
Question: does the action referenced by the conditional have to be the script test action or can it be a different steal action?
For example:
action x (a steal action)
{
if_obj_home_true y (a different steal action)
.................
}

5. "If_action_true/false" conditionals can only be used from within a dynamite test action.
Questions: is this correct? Can it reference other objective actions other than dynamite actions?
For example:
action x (a dynamite action)
{
if_action_true y ( a different dynamite action, steal, or spawn flag action)
............
}


Dum Spiro Spero


  
Reply With Quote
Re: A few clarifying scripting questons
Old
  (#3)
the bindlestiff
Member
 
the bindlestiff's Avatar
 
Status: Offline
Posts: 280
Join Date: Nov 2005
Location: Washington state
Default Re: A few clarifying scripting questons - 11-01-2006

Thanks for clarifying those points for me. Now I think I'll be able to acomplish exactly what I had in mind for mp_zion!
  
Reply With Quote
Reply


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

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