NeMeSiS 11 Posted October 23, 2004 [quote name=Zombie_Mod,Oct. 19 2004,18:20anyways..., were am i supposed to put gblAllTargets = gblAllTargets + [unit] Â in a trigger when a player died, or ...? Â Put it in the script that respawns the dead player. Just after the createunit command that respawns. That will do the track. remember, Player is a different object for each person's PC. Using gblAllTargets=gblAllTargets + [Player] never works in MP. hehe, fixed it, thank you! Â Hi. How did you fix this problem? I just ran into it. I'm not using a script to respawn the players. I'm just using the description.ext and a marker. just make a trigger with con:NOT(alive P1) on act: gblAllTargets = gblAllTargets + [P1] and put in the countdown thingy (the time it takes to respawn )+ 2 seconds , so it activates AFTER u respawned... Share this post Link to post Share on other sites
Ianing 0 Posted October 23, 2004 Cool. And if I turn up that cutdown a little I can give them a little bit of a safe time if need be. Thanks. Share this post Link to post Share on other sites
Zombie_Mod 0 Posted October 24, 2004 NEW UNIFIED ZOMBIE MOD EVENT HANDLERS Updated for RC2 (Nov 8, 2004) Assumptions: 1) You have version 1.96 of Flashpoint Resistance 2) You have downloaded the very latest zombie mod (see link in sig) and installed it as per instructions. Download the November 2004 script update from http://www.unifiedzombiemod.wz.cz Before you install the pbo from the RAR file, make sure you take a backup of any existing zombiescripts.pbo in res/addons as a precaution. The script update is a release candidate and as such has work in progress status. In short: USE AT YOUR OWN RISK. OK, now you have installed your PBO, you now need to know what event handlers are. The unified zombie mod event handlers allow developers to handle important zombie "events" in the game, such as when a target is hit/ killed by a zombie, or when a zombie resurrects. Yes, the event handler concept is similar to the existing flashpoint event handlers, but are implemented in a different way. The event handlers (.sqs files) are referenced by global variables of string type, all prefixed by gblXXX as per standard unified zombie mod notation. First, let's take a look at all of the available event handlers (the identifiers in square [] brackets are parameters passed to the event handler) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [zombie, target] gblOnAttack - fired when a zombie is close to its target and ready to attack. The target parameter an object reference, like the others, but the object is one of the following TYPES: "Man", "Car", "APC", "Tank", "Building". Query the type by using: typeof (target) e.g. ? typeof(_target)=="Man": goto "MyManAttackHandler" If you use the OnAttack event handler, you will have to create your own attack routines (animations, damage setting etc) as OnAttack overrides the standard code. Unless you are an advanced scripter, or you want to change the way the zombies damage targets, it is recommended you do not define this event handler. Now onto the rest of the EH's. Luckily these are a lot easier to understand: [zombie, target] gblOnHumanHit - fired from the server AFTER a human is attacked & hit by a zombie [zombie, target] gblOnCarHit - fired from the server when AFTER a car is attacked & hit by a zombie [zombie, target] gblOnAPCHit - fired from the server AFTER an APC is attacked and hit by a zombie [zombie, target] gblOnTankHit - fired from the server AFTER a tank is attacked and hit by a zombie [zombie, target] gblOnBuildingHit - fired from the server AFTER a building is attacked and hit by a zombie. [zombie] gblOnZombieResurrect - fired from the server after a dead human resurrects as a zombie. Zombie is a reference to the newly resurrected zombie, not the dead human. [zombie] gblOnZombieDeath - fired from the server when a zombie dies. Â This event should be handled with care. If you override this event, you will have to write your own zombie death and cleanup routines. Don't leave the dead zombie carcass lying around if you have gblIndestructibleZombies set to 1 - if you do, remember a new zombie will be spawned! It is generally a good idea for your eventhandler to use DeleteVehicle to delete the "dead" zombie from the battlefield. (An idea: CamCreate a "Shell125" object at the zombie's position - hey presto! Exploding zombies!!!) OK, now you know what event handlers are available, how do you define them? Follow this step-by-step guide and you'll be fine. 1. Go to the mission editor, and create a new "desert island" map. Desert island is the smallest map so will load the fastest. 2. Create a TRIGGER with ANYBODY NOT PRESENT, and the activation condition to <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> gblInitDone==1 Waiting for gblInitDone is very important. With RC2 the zombie mod turns "off" event handlers by default, and sets gblInitDone to 1 to say "OK, I've done all my work, NOW you can override the events" put the following in the ON ACTIVATION: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> gblEventHandlers=1 Now, it's hit the fan. You've broke the seal lol Once gblEventHandlers is set to 1, the event handlers can be overridden or turned off at will - it's up to you. Release candidate 1 didn't let you turn event handlers off, but RC2 does. 2. Create your event handler scripts. press ALT + TAB and navigate to your missions directory. Create a new, blank, text file called targethit.sqs. Open the file with notepad and add the following code: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _z = _this select 0 _t = _this select 1 _t globalchat format ["%1 HAS BEEN ATTACKED BY %2", _t, _z] exit In this event handler, _z will be assigned a reference to the zombie who attacked the human, and _t will be assigned a reference to the human who was attacked. 3. Make the gblOnHumanHit event handler active by going back into the flashpoint mission editor (ALT + TAB again). Â Create a TRIGGER, activated by ANYBODY NOT PRESENT, with activation condition: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> gblInitDone==1 Waiting for gblInitDone is very important. With RC2 the zombie mod turns "off" event handlers by default, and sets gblInitDone to 1 to say "OK, I've done all my work, NOW you can override the events" In the ON ACTIVATE statement, put: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> gblOnHumanhit = "targethit.sqs" You have told the zombie mod that every time a human is attacked by a zombie, to execute targethit.sqs. 4. In your mission, you could (note, I said could) repeat steps 2-3 for the gblOnCarHit, gblOnAPCHit and gblOnTankHit event handlers, which receive exactly the same parameters as gblOnHumanHit, but for our example just create a trigger (like you did in step 3) with the following on activate statement: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> gblOnCarHit = "targethit.sqs"; gblOnAPCHit = "targethit.sqs"; gblOnTankHit = "targethit.sqs" 5. You could define event handlers for gblOnZombieResurrect and gblOnZombieDeath, if you liked. For gblOnZombieResurrect go to your mission directory (again, use ALT+TAB if required) and create a file called zombiedeath.sqs. Open the file with notepad, and type in the following code: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _deadzom = _this select 0 _deadzom globalchat "OH NO I AM DEAD" exit In zombiedeath.sqs you could just as easily update a score variable (so for every zombie killed you get points) or trigger something else off.. 6. Make the gblOnZombieDeath event handler active by creating a game logic with the following initialisation string: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> gblOnZombieDeath = "zombiedeath.sqs" 7. We're at the last hurdle. All we need to do now is define the gblOnZombieResurrect event handler and then our event handling is set up. As per step 5, create a text file, call it resurrect.sqs. Insert the following code: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _resurrectedzombie = _this select 0 _resurrectedzombie globalchat "I'M BACK!!!" exit 8. Save all your .sqs files, if you haven't done so already. 9. Go into the flashpoint mission editor (ALT + TAB) and create a game logic called SERVER. 10. Put a ZOMBIE MOD - HARD GAME game logic on the map. 12. Liberally sprinkle tanks, cars, apcs and soldiers around the map. What you put is up to you. 13. Set up gblAllTargets as you would usually. 14. Put zombies on the map. 15. Execute the mission and watch the chat messages as humans and zombies get stuck in!!!! OK, so that's how you set up event handlers. But, let's say you want to disable an event handler later on in the game? Script upgrade RC1 wouldn't let you do that, but RC2 does. To turn off a specific event handler (and leave all other event handlers running) set the gblXXXX variable to ".", e.g. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> gblOnHumanHit = "." Of course, if you want to turn off ALL event handlers, use: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> gblEventHandlers=0 Is this clear? If not, feel free to post your questions in this thread, and I'll try to clarify further. Share this post Link to post Share on other sites
RipeMarine 0 Posted October 25, 2004 I have a question although it was kind of addressed already. How do you respawn a group of zombies at a marker or location rather than using the HARD difficulty setting where the zombies just spring back up. I want to have them die, then appear back a a given location, thnx in advance. PS this is the best mod for CO-OP games. Thank you for your hard work and dedication to creating such nasty beasties. RipeMarine Share this post Link to post Share on other sites
NeMeSiS 11 Posted October 25, 2004 I have a question although it was kind of addressed already. How do you respawn a group of zombies at a marker or location rather than using the HARD difficulty setting where the zombies just spring back up. I want to have them die, then appear back a a given location, thnx in advance. PS this is the best mod for CO-OP games. Thank you for your hard work and dedication to creating such nasty beasties. RipeMarine zombiename setdamage 0.8; zombiename setpos getpos something i can send ya a demothingy if u need it Share this post Link to post Share on other sites
general 0 Posted October 25, 2004 I'm making a zombie coop mission and I need to know how to make a difficulty were the zombies are strong or week. the difficulties are Noob Medium Hard Very hard You are al going to die! this is the zombiedamage scripts #Man _t setDammage Damage _t + gblZombieDamage ? gblEventHandlers==1: [_z, _t] exec format["%1", gblOnHumanHit] [_t, _z] exec {\ZombieScripts\HasBeenBit.sqs} ? !alive (_z) : goto "ckr" ? !alive (_t) : goto "eat" goto "Main" #Car _t setDammage (Damage _t + gblZombieCarDamage) ? gblEventHandlers==1: [_z, _t] exec format["%1", gblOnCarHit] goto "Main" #APC _t setDammage (Damage _t + gblZombieAPCDamage) ? gblEventHandlers==1: [_z, _t] exec format["%1", gblOnAPCHit] goto "Main" #Tank _t setDammage (Damage _t + gblZombieTankDamage) ? gblEventHandlers==1: [_z, _t] exec format["%1", gblOnTankHit] goto "Main" Share this post Link to post Share on other sites
general 0 Posted October 26, 2004 I have a question although it was kind of addressed already. How do you respawn a group of zombies at a marker or location rather than using the HARD difficulty setting where the zombies just spring back up. I want to have them die, then appear back a a given location, thnx in advance. PS this is the best mod for CO-OP games. Thank you for your hard work and dedication to creating such nasty beasties. RipeMarine zombiename setdamage 0.8; zombiename setpos getpos something i can send ya a demothingy if u need it  condition: not(canmove z1) activasion: zombiename setdamage 0.8; zombiename setpos getpos something do a lot off triggers like that. or u can make a trigger that respawns all the zombies after u killed them all. Share this post Link to post Share on other sites
Zombie_Mod 0 Posted October 27, 2004 Better to recreate all the zombies after you kill them. Whatever you do, don't use setdamage!!! Never assume all zombies will have 0.8 damage, thats only for the moment, because I'm using the standard civs for some of the zombies. Share this post Link to post Share on other sites
Zombie_Mod 0 Posted October 27, 2004 HOW TO MAKE A ZOMBIE GROUP APPEAR ROUND A PLAYER (not tested, but I think it will work - you will understand what I mean anyway, I hope!) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ; script to make zombies in group _gp surround player _player ; zombies will spawn _dist distance away _player = _this select 0 _gp = _this select 1 _dist = _this select 2 _steps = 360 / count units _gp _y = 0 #lp ? _y >= count units _gp: exit _unit = units _gp select _y _px = getpos _player select 0 _py = getpos _player select 1 _px = _px + (sin(_y * _steps) * _dist) _py = _py + (cos(_y * _steps) * _dist) _unit setpos [_px,_py, 0] _y = _y+1 goto "lp" Share this post Link to post Share on other sites
general 0 Posted October 27, 2004 I don't understand and no zombies appers. I named a gamelogic SERVER and typed in a trigger [this] exec "spawn.sqs" this error appers '_dist = _this select 2|#|': Error Zero divisor Share this post Link to post Share on other sites
Zombie_Mod 0 Posted October 27, 2004 You haven't passed the correct parameters to the spawn.sqs script!!! That's why you're getting the error. Try this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [Player, ZombieGroup, 50] exec "spawn.sqs" Don't ask me what ZombieGroup is or I'll scream!!! Share this post Link to post Share on other sites
Ianing 0 Posted October 29, 2004 [quote name=Zombie_Mod,Oct. 19 2004,18:20anyways..., were am i supposed to put gblAllTargets = gblAllTargets + [unit] in a trigger when a player died, or ...? Put it in the script that respawns the dead player. Just after the createunit command that respawns. That will do the track. remember, Player is a different object for each person's PC. Using gblAllTargets=gblAllTargets + [Player] never works in MP. Hi. How did you fix this problem? I just ran into it. I'm not using a script to respawn the players. I'm just using the description.ext and a marker. just make a trigger with con:NOT(alive P1) on act: gblAllTargets = gblAllTargets + [P1] and put in the countdown thingy (the time it takes to respawn )+ 2 seconds , so it activates AFTER u respawned... I tried creating the trigger. But it is not working. I dont think the trigger is even running. I added a text effect that should show up if it works. Here is a copy if anyone wants to look at it. test6.zip Share this post Link to post Share on other sites
Zombie_Mod 0 Posted October 30, 2004 Is the trigger ACTIVATED BY WEST or EAST? (Actually I see it's ANYONE, same problem though) If so, there's yer problem. No-one has walked into your trigger zone to activate it. Make your trigger ACTIVATED BY ANYBODY NOT PRESENT and move it away from the battlefield into the sea where no-one can reach it. I bet that activates. Share this post Link to post Share on other sites
Ianing 0 Posted October 30, 2004 Ok I will try that thanks. I had it over the spawn marker so when the civ respawned I thought that would of activated it. Share this post Link to post Share on other sites
Ianing 0 Posted October 30, 2004 Ok The problem is with the "Condition" field. If I removed "NOT(alive P1)" and put "this" in it worked (The text effect I had showed up). But I can not put "this NOT(alive P1)" with out getting a error. This is outside the area of zombie scripting. But any help would be greatly appreciated. Share this post Link to post Share on other sites
Zombie_Mod 0 Posted October 30, 2004 Howdy. I know why it's not working. this not alive p1 is not valid syntax. For a start, the keyword "this", as it is in C++, refers to the object who is executing the code, not any other object! In this case, it's the trigger - why do you want to check if the trigger exists? You are effectively saying <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> this trigger not alive player 1 That does not make sense, does it? So, get rid of the "this", as you don't really give a toss about referencing the trigger itself (what you gonna do with it?) and replace the NOT with the exclamation mark "!", as per C, C++, Java, etc. You will end up with this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> ! alive p1 I bet it works. Share this post Link to post Share on other sites
Zombie_Mod 0 Posted October 30, 2004 Quote[/b] ]Hey Zombie_Mod, great work on the mod, I just have some questions that weren't answered in the readme. Keep in mind I'm pretty new to Opflash scripting but was a programmer in school so I'm fairly keen on this stuff. I'm having an issue with the zombie corpses disappearing right away after they die and they always seem to kill me in one hit. I've added the gblZombieDelPause=50 and gblZombieDamage=0.25 to the GameLogic object but it doesn't seem to have any effect. Any ideas on how to get this working will be greatly appreciated as I intend to throw a Zombie mod LAN party on Halloween 2 things here: a) Please don't PM me with editing & scripting questions - I will never answer them. You know, I've had to set up a rule in my inbox just for the zombie mod, to handle all the mail from lazy people who can't be arsed reading the FAQ!!!! Sounds harsh? You should see my inbox! "The zombies aren't attacking... what is a gamelogic... how do I make the zombies speak...." b) Search before posting as I think this question is already answered. Share this post Link to post Share on other sites
NeMeSiS 11 Posted October 30, 2004 Ok The problem is with the "Condition" field. If I removed "NOT(alive P1)" and put "this" in it worked (The text effect I had showed up). But I can not put "this NOT(alive P1)" with out getting a error. This is outside the area of zombie scripting. But any help would be greatly appreciated. name the dude that has to respawn P1 @zombie_mod ! and NOT have the same effect in OFP NOT(alive P1) does exactly the same as !(alive P1) can send ya a mission with it Share this post Link to post Share on other sites
Ianing 0 Posted October 30, 2004 It is working now. Thanks for all the help. Share this post Link to post Share on other sites
Stylez 0 Posted October 30, 2004 I just have some questions that weren't answered in the readme. I'm having an issue with the zombie corpses disappearing right away after they die and they always seem to kill me in one hit. I've added the gblZombieDelPause=50 and gblZombieDamage=0.25 to the GameLogic object but it doesn't seem to have any effect. Any ideas on how to get this working will be greatly appreciated as I intend to throw a Zombie mod LAN party on Halloween Also: The zombies still seem to kill me when I'm in a vehicle. Is there any way to stop that from happening? Share this post Link to post Share on other sites
Zombie_Mod 0 Posted October 30, 2004 I just have some questions that weren't answered in the readme. Â I'm having an issue with the zombie corpses disappearing right away after they die and they always seem to kill me in one hit. I've added the gblZombieDelPause=50 and gblZombieDamage=0.25 to the GameLogic object but it doesn't seem to have any effect. Any ideas on how to get this working will be greatly appreciated as I intend to throw a Zombie mod LAN party on Halloween Also: The zombies still seem to kill me when I'm in a vehicle. Â Is there any way to stop that from happening? Stylez: 1. Have you placed a ZOMBIE MOD difficulty level game logic on the map and named it SERVER? 2. Do not put any code in a zombie mod game logic initialisation - it is always ignored! Use a normal game logic instead. 3. Zombies can catch you when in the car - and they shouldn't. The good news is that this is fixed in the NEXT script update, which will be coming very soon - release candidate 2. I'll let you all know when that's going to be ready for downloading. In the meantime, if someone is in a car, and you don't want them to be targetted, simply remove them from the gblAllTargets array, then re-add them when they get out of the car. Share this post Link to post Share on other sites
snipman 0 Posted November 3, 2004 hey i was wondering if there was a zombie animation pack with the zombies, because i remeber that the old pack had it................... ( ) and if there was can i get it? Share this post Link to post Share on other sites
Winters 1 Posted November 4, 2004 Hey, do you plan on making any of the zombies from Resident Evil? Just Kidding I started making a small campaign on my spare time and i must say i am really impressed with the zombies and their "eating" animation. Keep up the great work and watch for my campaign soon. Share this post Link to post Share on other sites
NeMeSiS 11 Posted November 4, 2004 why is glballtargets = [P1] + thislist (in a trigger) not working? would save me alot of time... Share this post Link to post Share on other sites
Zombie_Mod 0 Posted November 4, 2004 why is glballtargets = [P1] + thislist (in a trigger) not working? would save me alot of time... Â Dunno: Why not use the alternative: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> "gblAllTargets = gblAllTargets +[_x]" foreach thislist Share this post Link to post Share on other sites