Anyway, I've been trying to add an additional parameter to zombies, called "isRunner". I've modified the bottom of the zombie_generate.sqf file to include this line. (this will replace the global "DZE_slowZombies" logic).
The idea is to be able to pass the agent into the zombie_agent.fsm file with the potential to be a runner, where all other zombies would be walkers.
The issue i'm having is that in the FSM file, in the INIT box, I can't get my getVariable call to actually grab the agent's "isRunner" variable. This is how I'm attempting to do it.
_isrunner = _agent getVariable["isRunner",false];
if (_isrunner = true) then {diag_log "A Zombie is a Runner";};
For the most part, from what I can see, it's not pulling the variable correctly because the RPT file keeps erroring. Fortunately, it's defaulting to "false", so none of them are running.
The RPT error is also saying something around my diag_log missing a ")", but I can't figure out exactly why it's not working either.
(I'm a bit tired and been messing with this most of the day).
Anyway - any incites would be greatly appreciated.
Question
McKeighan
Interesting question, right?
Anyway, I've been trying to add an additional parameter to zombies, called "isRunner". I've modified the bottom of the zombie_generate.sqf file to include this line. (this will replace the global "DZE_slowZombies" logic).
_rnd = random(1); if (_rnd > .985) then { _isrunner = 1; } else { _isrunner = 0; }; _agent setVariable ["isRunner", _isrunner];
The idea is to be able to pass the agent into the zombie_agent.fsm file with the potential to be a runner, where all other zombies would be walkers.
The issue i'm having is that in the FSM file, in the INIT box, I can't get my getVariable call to actually grab the agent's "isRunner" variable. This is how I'm attempting to do it.
_isrunner = _agent getVariable["isRunner",false]; if (_isrunner = true) then {diag_log "A Zombie is a Runner";};
For the most part, from what I can see, it's not pulling the variable correctly because the RPT file keeps erroring. Fortunately, it's defaulting to "false", so none of them are running.
The RPT error is also saying something around my diag_log missing a ")", but I can't figure out exactly why it's not working either.
(I'm a bit tired and been messing with this most of the day).
Anyway - any incites would be greatly appreciated.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now