Home   Help Search Login Register  

Author Topic: Near invincible AI  (Read 1326 times)

0 Members and 2 Guests are viewing this topic.

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Near invincible AI
« on: 22 Mar 2005, 18:44:11 »
Hi all,
Is there a way to make AI take more shots to kill? Say, if you shoot him in the chest, theres blood and everything, but he takes 5 or so more shots to kill?
I'm trying to do it to make key squad members stay alive longer.  ;)

Thanks.
« Last Edit: 22 Mar 2005, 18:44:22 by greg147 »
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

GI-YO

  • Guest
Re:Near invincible AI
« Reply #1 on: 22 Mar 2005, 19:18:29 »
i've never tryed this but you could try something like

Loon setdamage 0

goto loop ~ 1

The syntax is no doubt wrong, but should give you a start. Hope that helps.

GI-YO

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:Near invincible AI
« Reply #2 on: 22 Mar 2005, 19:27:18 »
alternatively, use an event handler for the loons. slightly quicker. so for example,

Code: [Select]
this addeventhandler ["hit", _this setdamage 0]

in the init field should make the ai loon in question unkillable, although i seem to recall this being unhelpful when it came to explosions.
« Last Edit: 22 Mar 2005, 19:27:33 by bedges »

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Near invincible AI
« Reply #3 on: 22 Mar 2005, 19:49:47 »
No good for what he said, that will make him totally unkillable (Almost). Luckally I was making the worlds most interesting mission (and still am) And it consisted of a boss that you had to kill, here is what you may want to try just put [unitname] exec "Nameofscript.sqs"

Code: [Select]
_unit = _this select 0
_reduction = 5
#loop
_dmg = getdammage _unit
@(getdammage _unit != _dmg)
_dmggvn = getdammage boss - _dmg
_dmgamount = (_dmggvn * (1 / 5))
_dmgfinal = _dmg + _dmgamount
_unit setdammage _dammagefinal
?(getdammage boss >= 0.8):_unit setdammage 1
goto"reset"

For more health change the reduction number, the higher the number the more health.
Currently he will take a fifth of defualt dammage so hes pretty tough.
Or, if you want a more basic script try this:
Code: [Select]
_unit = _this select 0
_lives = 5
#reset
_dmg = getdammage _unit
@(getdammage _unit != _dmg)
_unit setdammage 0
_lives = _lives - 1
?(_lives <= 0):hint"Hes outa Lives!";exit
goto"reset"
This script he will have EXZACTLY five lives, so he will take 5 times as many hits.
« Last Edit: 22 Mar 2005, 19:53:19 by RujiK »
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:Near invincible AI
« Reply #4 on: 22 Mar 2005, 21:18:29 »
Thanks for the replys  ;)

I'll try those ideas, and post back if I have any problems  ;D
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:Near invincible AI
« Reply #5 on: 22 Mar 2005, 23:06:29 »
If you wanted something to simulate a bullet proof vest, take a look at this topic.

Although you may not survive even one hit if it is to your head, it does keep you alive long enough to try to get out of the line of fire, If you do not, then the next thing you know you are getting a bird's eye view of the battle.  ;)


                                                           Wadmann
Check out my Camouflage Collection! New items added 31 July 2005.

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re:Near invincible AI
« Reply #6 on: 23 Mar 2005, 03:34:54 »
anyone knows if it is possible to asing a unit via init or sometihing else to "setdammage -1" or lesss? this maybe will help... but i dont thing it worsk... :p

please respond!!


thanks

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re:Near invincible AI
« Reply #7 on: 23 Mar 2005, 08:02:34 »
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:Near invincible AI
« Reply #8 on: 23 Mar 2005, 11:32:31 »
Aha, thanks. I'll use that script  ;)

@Flauta
Unforunatly, setdamage -1 doesn't work.
In fact, it has a very different outcome.
It makes the AI and player have really HD guns  ;D
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline Roni

  • Members
  • *
  • Play the Game !
Re:Near invincible AI
« Reply #9 on: 24 Mar 2005, 00:10:02 »
How about a damaged EH -

this addeventhandler ["dammaged", _this setdamage (getDammage _this * 0.5)]

This should (?) reduce any non-lethal damage to a character by 50%.  It won't save him from a head shot but it should stop him being picked apart by multiple hits.



roni

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Near invincible AI
« Reply #10 on: 25 Mar 2005, 03:15:46 »
Actually that could even reduce your dammage when you get hit. Because it will be reducing your ENTIRE dammage by half, not just the dammage given, there the unit will almost be invincable.
I like your approach, lets see your departure.
Download the New Flashlight Script!