Jump to content


Photo

Battlebus multple lives


  • Please log in to reply
6 replies to this topic

#1 Akkrand

Akkrand
  • New Members
  • 61 posts
  • Location:Melbourne, Australia

Posted 09 August 2004 - 04:59 AM

Hi,

Does anyone know how I can tell if a battlebus has lost its first 'life'?
I ask because the computer using battlebuses is quite nasty, but sometimes I have them load them with a full 8 tunnel defenders, and when the battlebus loses its second life, they all die; quite expensive.
I'd prefer it if I could do something along the lines of (in psuedocode):
IF
Battlebus has lost first life
AND
Battlebus is at 25% or less health
THEN
Team <This Team> evacuates its transports.

and then the team can either hunt or head back to base and disband, so they can jump into another bus.
I'd also like some sort of check like if the battlebus has lost its first life and there are no enemies in range then exit the transport and head back to base and disband.

Seems that the computer would be a whole lot more effective if he didn't waste these thousands of credits and the time to build these guys.

Anyone got any suggestions where I'd find a condition or action that could check this? I've had a cursory glance over the conditions and nothing jumped out at me.

Cheers,
Lord Akkrand

#2 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 09 August 2004 - 08:41 AM

Hmm did you actually try that script above? It's not pseudocode, in the Behavior tab of a team there is an On Destroyed one ...

I suggest you try that first.. as it would be the most obvious thing.


EDIT: NO! I have a better solution. In the behavior tab again, two slots under On Destroyed is On Unit Destroyed... maybe the first life of the BB counts as Unit Destroyed

Edited by Mithril, 09 August 2004 - 08:42 AM.

Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#3 Akkrand

Akkrand
  • New Members
  • 61 posts
  • Location:Melbourne, Australia

Posted 10 August 2004 - 12:17 AM

Cool thanks Mithril, I never noticed the 'On Unit Destroyed' one... I'll try that.

BTW I've made a whole bunch of changes to the Dynamic Attack Paths that I use in my AI - it does a bunch of stuff with timers, counting how long each probe takes to get killed after it first gets attacked, and then comparing the timers of the various probe teams after they're all dead to determine which entrance to use... There are things that can screw it up a bit, but it seems to make more informed decisions, and it especially useful when there are multiple entrances flagged 'without defences', or if all the entrances are flagged 'with defences'...

I've also got another query about the script debugger; do you know a way to run a skirmish with 2 computers vs each other without needing to have the graphics window displayed... 'cos the game runs soooo much slower with the debugger in windowed mode, I wanted a way to quickly test my scripts by running a game with 2 comps, and just having the debugger as the only output... atm I start a network game with myself and 2 computer players and then surrender the second the game starts, leaving the 2 comps to battle it out...

Also I've put my latest version (1.09) on my site.

Cheers,
Lord Akkrand

Edited by Akkrand, 10 August 2004 - 01:38 AM.


#4 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 11 August 2004 - 08:37 AM

I've also got another query about the script debugger; do you know a way to run a skirmish with 2 computers vs each other without needing to have the graphics window displayed... 'cos the game runs soooo much slower with the debugger in windowed mode, I wanted a way to quickly test my scripts by running a game with 2 comps, and just having the debugger as the only output... atm I start a network game with myself and 2 computer players and then surrender the second the game starts, leaving the 2 comps to battle it out...


Unfortunately, we are doomed to this slow performance. As soon as the script debugger runs, its much slower, even the 10x function seems to be slower..

It depends on the scripts too. I haven't been able to identify which scripts cause the lag in ZH yet, but challenge maps for example run smoothly with the SD.

Until someone programs a better debugger (fat chance, as it will have to be someone else than EA for obvious reasons) we are quite possibly doomed to the slow debugging :(
Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#5 Akkrand

Akkrand
  • New Members
  • 61 posts
  • Location:Melbourne, Australia

Posted 12 August 2004 - 12:45 AM

Hmm the 'Unit Destroyed' script only got run once the battlebus died the second time, and of course then it was too late...
I've also tried doing some stuff with the 'Unit <This Object> Health is Less than 25%' condition in general, but this never seems to be true, even as I watched the battlebus slowly lose its life and then its second life... weird...
anyway, I'm trying to see if any of the state (or was it status?) flags get set, like IMMOBILE, KILLING SELF, AIRBORNE TARGET (it flies as it dies), DESTROYED, DEPLOYED (it deployes into a 'bunker', etc.
I'll get back to you when I have some developments.
Also, got a better way to do the bombtruck scripts (less global variable dependant), will post it when I've tested and confirmed.

EDIT:Well I've tested and they're no good. The only one of the flags that set was DESTROYED, and, you guessed it, that happened when the second life was lost.
This is quite frustrating, as I'd really like the guys to get out of the death trap they're in once it stops being a mobile deathbot factory and starts becoming a liability.
Any other ideas?

Also I've tested my new bombtruck thing and I'll post that in the bombtruck thread.

Cheers,
Lord Akkrand

Edited by Akkrand, 12 August 2004 - 01:08 AM.


#6 Mithril

Mithril

    496

  • Hosted
  • 1,386 posts
  • Location:UK
  • Projects:Heh! You're not going to ask me that question.

Posted 12 August 2004 - 09:05 AM

***IF***
Team <This Team> has object status is 'IMMOBILE'
***THEN***
Team <This Team> unload ; whatever

it may work, not completely sure but that is the first thing I can think of..
Command & Conquer: Red Alert - ReGeneration

"Not the faintest clue =\"

-ComradeJ

#7 Akkrand

Akkrand
  • New Members
  • 61 posts
  • Location:Melbourne, Australia

Posted 12 August 2004 - 11:16 PM

Nah IMMOBILE was one of the things I was checking above, I had 10 seperate scripts in Generic that went just like that, but used the scripting 'Pause and display a message' as the action... The only one that fired was the one for DESTROYED, and that was when the battlebus died the second time...

So no good.

Ah well, I'll leave it in the back of my mind and do something else...

Cheers,
Lord Akkrand




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users