Home   Help Search Login Register  

Author Topic: Zombie that won't stand.  (Read 1233 times)

0 Members and 1 Guest are viewing this topic.

Fluffy

  • Guest
Zombie that won't stand.
« on: 13 Aug 2003, 19:20:53 »
 :P I've tried alot of lines to get thes guys workin right, but i can't figure out how to get my lil' zombie friends to do everything right.

First of all, i want them to always stand and fight, But with no weapons.

I want them to be good and bloody so its a little more... interesting to look at, or run from.

And, i don't want them to be dying, you know... cause they're already dead.

I got the punching in, but i guess they can only punch standing, and i can't get the AI to always stand. They lay down as soon as an enemy gets close, or they go prone right from the start because of the damage level on to them. (I turned down their health so they'll be nice and bloody) As for the blood, if anyone has an alternate way to make them bloody beside lowering their health let me know. The dying thing... I got that taken care of using an idea from HotShot's command pack.

Anyway if anyone has any ideas to help me that'd be great. I'm new to this forum, and i'm really just starting to work with scripting. Thanx for the help. ;D

m21man

  • Guest
Re:Zombie that won't stand.
« Reply #1 on: 13 Aug 2003, 20:28:29 »
Standing Up:
zombie setunitpos "up"

Maybe this will keep those zombies from dying.
Not dying:
#ZombieLoop
?(getdammage zombie > .75): zombie setdammage .75
goto "zombieloop"
« Last Edit: 13 Aug 2003, 20:29:22 by m21man »

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Zombie that won't stand.
« Reply #2 on: 13 Aug 2003, 20:41:27 »
that's what we call the lagloop  :-*

A more proper way of doing it would be

#Zombieloop
@getdammage zombie > .75
zombie setdammage .75
goto "zombieloop"

or

#Zombieloop
;-- change value of delay to suitable for needs.
~0.1
?(getdammage zombie > .75): zombie setdammage .75
goto "zombieloop"



A loop without any delay will basically run as fast as your computer is able to run it, thus causing mucho lag.  :)
Not all is lost.

_Ross_

  • Guest
Re:Zombie that won't stand.
« Reply #3 on: 13 Aug 2003, 23:07:12 »
but doesent a bullet kill something instantanoeously? so the delay might not kick in in time. isnt there a allowdammage TorF command?

Fluffy

  • Guest
Re:Zombie that won't stand.
« Reply #4 on: 14 Aug 2003, 00:31:50 »
From HotShot's Command Pack -

"    *Stay Alive!*
To make an AI unit stay alive type the following in the corrosponding feilds in a trigger set to Repeatedly:

Condition: Not Alive unitname
Activision Feild: unitname setdammage 0
     
NOTE: This doesn't work with a real life player controlled unit as the unit still dies its just brought back to life quickly
."

Thats what I've been using to keep them alive, I'm gonna try the loop thing though, Thanx.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Zombie that won't stand.
« Reply #5 on: 14 Aug 2003, 07:03:27 »
Use an eventhandler: unit addeventhandler ["hit",{_this select 0 setdammage .75}]. This won't lag and will kick in faster than any trigger or script you can set up. In fact, you can make the player invincible with these things. It's rather fun to stand on top of an exploding satchel charge and then go flying through the air....
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Fluffy

  • Guest
Re:Zombie that won't stand.
« Reply #6 on: 14 Aug 2003, 19:01:33 »
 ;D Great thanks everyone, New Question though, how can I eject an AI group out of a plane when it reaches a trigger area?

frankie86

  • Guest
Re:Zombie that won't stand.
« Reply #7 on: 14 Aug 2003, 19:24:53 »
This is one of those really common FAQs.

If you want a really good parachuting script go to the Code Snippets section and there should be one there.

otherwise u can do:-

"unassignvehicle_x" foreach units "Group"

~2

man1 action ["eject",aircraft]

~2

man2 action ["eject", aircraft]

and so on and so forth...

If you dont use the unassignvehicle command, the AI group will try and reboard the helicopter/plane