Home   Help Search Login Register  

Author Topic: Invincible Units  (Read 3419 times)

0 Members and 1 Guest are viewing this topic.

shadow99

  • Guest
Invincible Units
« on: 03 Aug 2004, 03:42:21 »
Hah, I've decided to ask all the little questions that have always bugged me all at once. I should have limited to one thread instead of posting them as I thought of them, though. Sorry about that.

Anyway, my question is, is there anyway to make a COMPLETELY invincible unit?

You see, I want the player to be in a group, and the leader of this group to stay alive throughout the whole mission (being one of the campaign's main characters).

Quote
this setCaptive true
works to some extent but there's still a chance the leader could be killed by an out of control grenade, a tank explosion, etc...

There must be a script to keep completely invincible somehow. What about something like this in a trigger:

Condition:
Code: [Select]
not alive leader1
On Activation:
Code: [Select]
Alive leader1
or something? I'm sure 'alive leader1' isn't a command, but it's an idea to keep him alive if he's killed.

It would be good though, if damage didn't effect him in any way. That way, the player would never be stuck with a leader that has to crawl through the whole mission.

Is any of this possible? Through a script, maybe?
« Last Edit: 03 Aug 2004, 03:45:31 by shadow99 »

olseric

  • Guest
Re:Invincible Units
« Reply #1 on: 03 Aug 2004, 03:47:37 »
Create a simple script:

#loop
? (damage player > 0): player setdamage 0
goto "loop"

Just one idea...

Dubieman

  • Guest
Re:Invincible Units
« Reply #2 on: 03 Aug 2004, 04:28:51 »
Easy, make a trigger the size of the area where the leader will be and make it repeating and then:

Condition: Not Alive unitname
Activision Field: unitname setdammage 0

There you go. Don't try it on yourself though. This just brings the unit back to life quickly, the onplayerdeath.sqs will still run and you'll still be dead if you use it for the player. :P


« Last Edit: 03 Aug 2004, 04:29:23 by GuiltyRoachKillar »

shadow99

  • Guest
Re:Invincible Units
« Reply #3 on: 03 Aug 2004, 04:31:41 »
Simply wonderful. What did you say about the onplayerdeath.sqs though GRK?

Thank you Olseric, as well.

Dubieman

  • Guest
Re:Invincible Units
« Reply #4 on: 03 Aug 2004, 04:51:47 »
I heard about this automatic script that executes once the player reaches at least a dammage of 1. Then I think it starts that little death scene with a quote and who killed you and all that. But I just heard that, I've never messed with it. :P

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Invincible Units
« Reply #5 on: 03 Aug 2004, 09:45:13 »
If you really want to make him invincible do the setdammage thing as suggested, and do the setcaptive thing too (alhough nobody will shoot at him.    Better yet, add an eventHandler "hit".

The script onPlayerKilled.sqs is launched automatically when the player dies.    It shows you the standard little scene you get when you die.   If you want to create a custom version you can - just put a script file of that name in your mission folder.    You are very strongly advised to use the original as a template because there are certain things (like variables being set) that must happen during this script for the game to work correctly.
Plenty of reviewed ArmA missions for you to play

shadow99

  • Guest
Re:Invincible Units
« Reply #6 on: 03 Aug 2004, 09:51:27 »
After reading through everything, I decided upon using the 'setDamage 0' thing, but I chose NOT to do:

Code: [Select]
this setCaptive true
Why?

Because if the leader is somehow wounded the legs and has to crawl around, that's a long time he's crawling trough the whole mission...

However, if he's not a captive, the enemies will go to the extent of finishing him off. And when they do, he is returned to full health, and his legs will no longer restrict him to crawling...

minimilo

  • Guest
Re:Invincible Units
« Reply #7 on: 03 Aug 2004, 20:13:19 »
last night i tried in the activation of a trigger

unitname setdammage -100

i know the code took effect because my player went a bit wierd and his gun was goung up and down, any ideas how i can get more health

Dubieman

  • Guest
Re:Invincible Units
« Reply #8 on: 04 Aug 2004, 01:28:27 »
Too much life in the bastard, a few aK bullets here, a few more there, then a head shot, and we're okay! :D ;D

I dunno about giving people negative life ratings like that.

If you give a tank a setdammage 15, the hulk of metal is VERY black. Doesn't look like a tank almost. :P

But I dunno about units...

shadow99

  • Guest
Re:Invincible Units
« Reply #9 on: 05 Aug 2004, 06:40:57 »
Interesting, I'll give it a shot. Thanks for the info...

shadow99

  • Guest
Re:Invincible Units
« Reply #10 on: 05 Aug 2004, 06:50:00 »
Actually, setDammage 15 doesn't do anything but instantly kill the unit... not even with a tank does it do as you said...

Where did you get the idea?

Anyway, it was a thought. thanks

Kaliyuga

  • Guest
Re:Invincible Units
« Reply #11 on: 05 Aug 2004, 08:49:19 »
 I've always heard rumors of numbers above 1.0 resulting in more damage, bigger explosions.. etc..   but I've never seen it work personally...

its 100% damaged.. you can get much more than that :p

;D

olseric

  • Guest
Re:Invincible Units
« Reply #12 on: 05 Aug 2004, 10:53:31 »
Actually, if you peruse the forums here and the "official" ones, you'll see posts related to the various levels of setDamage.

Basically, shadow99 was correct in saying that bigger numbers don't do anything, however, someone posted that if you setDamage a tank to, say, 4, it'll blow bigger.   I have tested that and found that it doesn't work.

I have, however, found that negative damage numbers will create a drunk-like character.  The "more negative" the number, the more intoxicated your guy will seem.  I have no clue how it affects actually taking lead.

Dubieman

  • Guest
Re:Invincible Units
« Reply #13 on: 05 Aug 2004, 16:39:05 »
 Actually I tried it a long while back. There was no big explosion but I think it wasn't 15 it looked blacker on like 2 or 3.... :P :-\


Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Invincible Units
« Reply #14 on: 05 Aug 2004, 20:11:13 »


 ??? is there anyway to make a COMPLETELY invincible unit?




 8) The coolest "Arnoldinvinsiblemuthafrikkinslayer" will always be the PBO'ed custom unit. :o ;D

 :) it takes no more then a tweaked config; and the part to change is just this:

 armor=1000000000000;

There!    A 100% bullet proof soldier, ready to eat shells & rockets of any kind  ::) ;D


Later :-*