Home   Help Search Login Register  

Author Topic: Dead but wait  (Read 1189 times)

0 Members and 1 Guest are viewing this topic.

Dubieman

  • Guest
Dead but wait
« on: 22 May 2004, 21:55:58 »
I was starting to think about this idea that you command a group of crazy dudes who can respawn themselves after being shot down by gunfire or a grenade. But I want them to be dead and not come back should they be hit by missiles, rockets, or tank rounds.

How do you do that?

I already know how to bring them back to life.

j-man

  • Guest
Re:Dead but wait
« Reply #1 on: 22 May 2004, 22:28:17 »
Well, there's a script in the ed. depot that can check who killed the soldier. I suppose you could use that to detect if they where killed by a tank or a soldier. Probably not the best way to do it though :P

Dubieman

  • Guest
Re:Dead but wait
« Reply #2 on: 23 May 2004, 00:46:49 »
Maybe if I use that it'd work. My ed depot links  are still messed. hint hint hint ofpec

But your guys are brought to life by the alpha command. Your their leader, but you can't really die, well i have a script for myself.... On code alpha the guys come back so the killed by thing might work. Try it later though, can't play now. :(

PsyWarrior

  • Guest
Re:Dead but wait
« Reply #3 on: 23 May 2004, 17:34:25 »
Greetings,

If you use a 'Killed' eventHandler, you can pass the identity of the killer to a script. I believe that you could then use the type command to discover if it was a tank or aircraft.

As for grenade... I don't know! I'm not sure that there is a way to detect if a unit is killed by explosives. :-\

But a Killed eventhandler should remove the necessity for a separate script snippit from the Ed Depot. Unless you're using 1.46, of course :noo:

-Supreme Commander PsyWarrior
-Psychic Productions Studios
P.S. -
Quote
hint hint hint ofpec
Leave the poor admins alone... they're working hard to get OFPEC working properly... :beat:

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Dead but wait
« Reply #4 on: 23 May 2004, 20:45:04 »
Well, there's still a problem with 'killed with what'... ::)

The killed EH returns 'who killed' but does not return 'by using which weapon'...

So you would need to first identify the target and then postponedly check what weapon the killer used, so you would need a global variable or something to store every single units 'fires' with fired EH...

For example tank has two weapons so you can't presume that it always kills you with the 'cannon' because it has most likely sprayed you with it's MG...
Same goes for most of the choppers...

As for the grenade, it is classed as 'throw' weapon (afaik), so it should be returned by a fired EH as throw...

Well, in a few moments somebody from ECP comes here and proves me wrong... :P ;D
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Dubieman

  • Guest
Re:Dead but wait
« Reply #5 on: 23 May 2004, 20:58:22 »
I guess I'll make this clear.

Come back from:
7.62 or 5.45 bullets
tank mgs
grenades
brownings

CANT come back from:
Hellfire
FFAR
satchel
mine
tank round  HEAT or SABOT
RPGs or LAWS
AT3s or carl gustavs
30 mm cannon
a10 30mm cannon
mavericks
missiles
GBUs


Sounds like some of that might work. Bullets should be easy except for tank ones. So there is no way to find out what weapon killed the dude other than going through the actual killer himself....

Grenades shouldn't be a problem. Actually any of the weapons listed from above in the can comeback don't need to be touched apon since I hit alpha and the dudes come back.
Ijust want to prevent the guys from coming back should they die from the weapons listed as NONE comeback ones.
I don't think I'll have many UH60mgs though....

Complicated :P    :)
« Last Edit: 23 May 2004, 20:59:52 by GuiltyRoachKilla »

TERA_Forrest

  • Guest
Re:Dead but wait
« Reply #6 on: 24 May 2004, 03:33:05 »
not sure if this will help u but u could try this

this addEventHandler ["hit",{h1 setdammage 0}]


change "h1" to the name of the ai/person and they will only die if shot in the head.

PsyWarrior

  • Guest
Re:Dead but wait
« Reply #7 on: 24 May 2004, 12:11:15 »
Greets,

I see your point, Kint, But the only way I can see to check if a unit was killed by an explosive is, as you say, to place 'fired' eventhandlers in every single unit on the map (including allied units, in case of 'friendly' fire), then check if a unit is KIA (more EHs), soon after another unit fires.

Of course, when a unit is killed, you would need to run checks against every time the unit has fired recently, and then deduce which 'firing' caused the death of the soldier.

But if a MBT fires a shell, killing one of the units, and then immediately opens up with the machine gun, the script system will probably assume that the elite-genetically-engineered-cyborg-respawning-soldier was killed by a MG bullet, not a shell.

It is possible (in theory), but not easy.

Why would grenades allow you to respawn, but not LAWs/ RPGs? In fact, in OFP grenades seem to do much more damage to infantry than the RPGs do...

@HateR_Kint: Looks like ECP are kind of busy right now... :P

-Supr. Cmdr. PsyWarrior
-Psychic Productions

Dubieman

  • Guest
Re:Dead but wait
« Reply #8 on: 24 May 2004, 20:30:40 »
I dunno why I picked nades to be in the come back catergory. I guess I could change it....

Will all those event handlers be a real lag problem?
I'm going to have the whole fucking NATO army on Malden coming after you and your squaddies.

If worse comes to worse I may just use that event hadler by TeRAForest for my guys. Kinda resembling every other zombie game out there since to kill the undead a head shot usually does it.... :P

I had a script but I think I deleted it but it was for my air campaign and it strengthened the UH60 you piloted by repeatedly getting damage and if > 0.25 it'd reset the health to full. I'll redo it and test it with nades, rpgs, tank rounds to see what happens when those hit it. Bullets have basically no effect on the script.

PS: The campaign didn't work out.... :'(

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Dead but wait
« Reply #9 on: 24 May 2004, 20:49:15 »
Can't you make it a bit scary? Like the player can take a lot beating, but damage from everything. Use EH to lower the damage. And when he has been taking damage he must restore his health by eating brains or sucking blood of dead bodies or whatever.

:beat: *Gets Shot* :beat:

Dubieman

  • Guest
Re:Dead but wait
« Reply #10 on: 25 May 2004, 03:07:30 »
But I don't want to do more work. WHINE, COMPLAIN.... :D :)

That sounds kinda good. You should read the topic in mission ideas and given me the idea there but it doesn't matter. The whole story is in mission ideas.

So maybe an event handler or something complicated, I got the lab place set up almost so I gotta start really makin the damn thing.

Back to the brains thing. Maybe for every dude you kill, you must get within say 3 to 5 m of the body and poof a little bit of health is given back. Can that happen? Or can it be done? If so what's an appropiate amount of life to give back and how do think I can vary it?

So many questions... :noo:

And don't worry armstrong, the mission will have a thunderstorm part to it... ;)
For horror of course.
« Last Edit: 25 May 2004, 03:08:45 by GuiltyRoachKilla »