- 0
epoch player_zombieAttack maybe a logic failure?
-
Similar Content
-
- 2 replies
- 434 views
-
- 7 replies
- 3519 views
-
- 0 replies
- 373 views
-
- 1 reply
- 348 views
-
- 3 replies
- 798 views
-
- Advertisement
Question
ViseVersa
Hi,
i was currently working on rewriting the player_zombieCheck.sqf to a more nicer and faster Version, when i encountered a weired thing. Inside the script, the player_zombieAttack.sqf is called ([_x, "zombie"] spawn player_zombieAttack;) so i looked into the File and noticed a few things.
First of all this is the only instance, where zombieAttack is called, so the type is allways "zombie" and could be taken out. I'm guessing they wanted to make dogs attack things to, but never completed it. The second thing is -
Now the first bit is clear, it's a variable, that you can set in variables.sqf to determine, if zombies should be attacking a vehicle or not. But the second bit i'm confused from. "!vehicle in targets" - This yeah ok it means, that the vehicle should not be in the target list, but then again in the zombie Check it will add the vehicle to the target no matter what. So basically this means that the if is failing, because when the vehicle is NOT in the targets (which it is!) the script will exit.
Honestly, this is melting my brain.
I`m thinking about it like this if the vehicle is in targets it will return true, but the script will only exit, if it returns false, am i right? So this means, that if the vehicle is in targets the script won't exit and the zombie is still gonna attack the vehicle or not? I`m thinking, that the whole second part shouldn't even be in there, so it should look like:
I need help understanding this. Is my conclusion correct or not?
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now