skrinimator
16 years ago
i want to put a time limit before a team goes hunting how do i do that?
Sponsor
Drummin
16 years ago
Flags are the best way to control a Subroutine, so if you are using a script that says
*** IF ***
    True.
*** THEN ***
   Team '<This Team>' begins hunting.
Make another script to initialize or set the flag to zero.
*** IF ***
    True.
*** THEN ***
  Set Flag named 'StartHunt' to FALSE
Then have your timer set the flag to true.
*** IF ***
    Timer 'HuntingTimer' has expired.
*** THEN ***
  Set Flag named 'StartHunt' to TRUE
Apply this flag to your Hunt script.
*** IF ***
    Flag named 'StartHunt' IS TRUE
*** THEN ***
   Team '<This Team>' begins hunting.
Use this script for the On Create behavior for the team.
skrinimator
16 years ago
THanks that helped, one more thing,
can i set an option where the player (me) can't build a specific building like a war factory or an airfield?
Drummin
16 years ago
Yes, you'll find this Action under Map/Modify/Adjust the tech tree for a specific object type. This script would go in the PlyrCivilian folder.
*** IF ***
    True.
*** THEN ***
   'AmericaAirfield' becomes Buildable (No)
   'AmericaWarFactory' becomes Buildable (No)
skrinimator
16 years ago

Flags are the best way to control a Subroutine, so if you are using a script that says

*** IF ***
    True.
*** THEN ***
   Team '<This Team>' begins hunting.
Make another script to initialize or set the flag to zero.
*** IF ***
    True.
*** THEN ***
  Set Flag named 'StartHunt' to FALSE
Then have your timer set the flag to true.
*** IF ***
    Timer 'HuntingTimer' has expired.
*** THEN ***
  Set Flag named 'StartHunt' to TRUE
Apply this flag to your Hunt script.
*** IF ***
    Flag named 'StartHunt' IS TRUE
*** THEN ***
   Team '<This Team>' begins hunting.
Use this script for the On Create behavior for the team.

drummin wrote:





He4y it's me again, last time when i wrote "thanks that helped" i was rushing, i wanted to know where i can find the "flags" and the script to set them to zero...would be very appreciated 🙂
Drummin
16 years ago
If you're using Zero Hour it's under Scripting/Flags/Set flag to a value. Generals is a little different but should be listed under Scripting.