Home   Help Search Login Register  

Author Topic: Zombies on Novoga  (Read 1378 times)

0 Members and 1 Guest are viewing this topic.

ElemenS

  • Guest
Zombies on Novoga
« on: 26 Aug 2002, 00:16:40 »
Im doing a survival coop on novoga.
Main things are set and its gonna be great, as long as i get the lines which make my 'zombies' act like ones...

I need to know, how to command the script to select the variable as the unit, which had the *[] exec "script.sqs"* in its init.field. 'Cos i dont wanna set a permanent name for every zombie on the island, and for every zombi its individual script with the unitname.

so this example works, not counting the
part where the zombie plays the 'attack animation(fiststroke)',
nor where the player gets damage from that attack.

This example has the 'hero' unit named "m" and the civilian zombie with unitname "zombi",
just the basics so far:

;script starts, zombi doesnt do anything untill our hero gets
;close enough to get the undeads attention, in this case,
;moves closer than 50m in range.
;***CRUCIAL*** lets say the map has 4 playable units.
;named A,B,C,D, how do i change this script so that any
;zombie checks if any of these four guys are in 50m range,
;and then attacks that very person who entered the 50m
;area?
;***PLUS*** how do i make the script refer to the unit
;which has this script in it, instead of the current individual
;unit name based selection, this case "zombi"?

 
;check if hero within 50m of zombi
#start
dostop zombi
?(m distance zombi < 50):goto "loop"
~2
goto "start"

;if he is, then zombi starts chasing him

#loop
zombi dowatch m
zombi domove getpos m

;until he gets up to <1meter, which, doesnt quiet work
;since units concider themselves as halfdone, they only get
;as close as 3-5m, thats always enough for them.
;any idea how i get the zombi forcemove like relaly in the
;heroes face?

?(m distance zombi > 50):goto "start"
?(m distance zombi < .5):goto "atak"
~2
goto "loop"

;well, now the zombi is close enough, and does his attack
;action as long as its within half a meter from its target
;and then starts chasing him again etc...

#atak
dostop zombi
zombi dowatch m
~1
zombi playmove "StandStrokeFistend"
~1
m setdammage +0.2
~1

?(m distance zombi > 50):goto "start"
?(m distance zombi > .5):goto "loop"  

goto "atak"
 
***
;end

So, the civil doesnt want to play the fiststroke animation in that style you can see above. but for some(?) reason he does it when i disable all other commandlines except :

~1
zombi playmove "StandStrokeFistend"

exit

That 3 line script makes him 'punch' air, like i want him to do when hes close to the player.
How come he doesnt do it in the multiline script?

The other big issue was dealing damage.
after zombi does his hit:

m setdammage +0.2

the hero should die after 5 punches. (x0.2=1)
I know its a wrong line, but how do i damage him partially ?
How do i decently add 20% reduced health to the hero by every hit? or a random counter, every hit reducing 10-20% of the starting health.

One more than already came into my head:
They can find armor and use it/drop it.
i just add a basic counter for all 4 guys at start with armor=0
And a extra command line to the zombi attack loop
which checks if the target has armor 1 or 0, and reduces the damage thereby.

How do i represent the armor as an item, like a grenade, so one can drop it and it can be seen on the ground?
i know how to do the addaction into the action menu, add the commands and animations.

Could have asked these questions in ten lines, made it a hundred 'cos i got carried away.

It shouldnt be anything hard, but i always miss a digit or two which screws up all my wannabe working script into the bellissimo bugged one.

Thanks in advance for any helping feedback
and feel free to contact me on the subject, or if u want me to put your innovations in it.
Its gonna be a 3 part series so far.
Survival horror baby, yeah....
lot of in-game camscripts , good plot , and a 100% eerie atmosphere.
 ;D ;D ;D

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Zombies on Novoga
« Reply #1 on: 26 Aug 2002, 00:44:46 »
1) 2 make all da zombies exec da same script modify ur script in da next way

ad in da start (b4 anything else)

_zombie = _this select 0

nd were u wantda zombie do somthin just use

_zombie instead da name of da unit

nd in da execution use [unitname] exec "script.sqs"

2) 2 make him detect each one of da 4 units just make da loop like dat

Code: [Select]
#start
dostop zombi
?(A distance zombi < 50):goto "loop"
?(b distance zombi < 50):goto "loop1"
?(c distance zombi < 50):goto "loop2"
?(d distance zombi < 50):goto "loop3"
~2
goto "start"


nd make loop 4 each soldier

3) to add damage %20 dammage u need 2 use da next line

Code: [Select]
unitname setdammage (getdammage unitname +0.2)

dats all i can think off at da moment  ;D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

waldo

  • Guest
Re:Zombies on Novoga
« Reply #2 on: 16 Oct 2002, 04:18:21 »
ElemenZ, did you ever get this to work? Because i LOVE zombies! and would realy like to have an example mission (so i can make zombie maps too) if so, where can i get it?

mcnils

  • Guest
Re:Zombies on Novoga
« Reply #3 on: 16 Oct 2002, 05:03:56 »

Yes zombies are lovely loool  ;)