View Single Post
Old 04-27-10, 12:54 PM   #4
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by Nisgeis View Post
If you want to see starshells when you are detected, then add in '1 or' to the precond of Ship:CanFireStarShells(), so that it becomes:

In that way, the ships that are capable will all fire star shells as soon as you are detected. They will fire them repeatedly (after they have reloaded) even during the day time. If you want a bit more control, then you'll need to decide what conditions you want them to fire starshells (like whether it's night time and whether they need to) and script that in (replace the 1).

CanFireStarShells() comes from the game engine as to whether or not it is the right conditions to fire. They do fire in stock, according to one reply in that thread. I will be developing the star shells further, as they are an essential part of Operation Pineapple and some early war tactics.

Nice . Thanks for reply.

could we do something like:

Code:
 
strategy ShipFireStarShells(Ship)
{
precond
{
!Ship:IsDay() or Ship:CanFireStarShells()
}
action
{
Ship:FireStarShells();
}
reaper7 is offline   Reply With Quote