Andreilarazboi 0 Posted September 7, 2023 Ok so i am working on a Zeus module that is spawning a civilian unit which should behave like a zombie, tried a lot of times to incorporate this into ZEPT/ EZM with new stuff but got a lot of errors, after i fixed those errors when you place the Module it does not work. here is the script: Quote MAZ_ZEPT_fnc_CivZombie= { ZEPT_fnc_createCivilianZombie = { // Get the module's position directly using 'this' private _modulePos = getPos this; // Extract X and Y coordinates from _modulePos private _xPos = _modulePos select 0; private _yPos = _modulePos select 1; // Create an array for the zombie's position private _zombiePos = [_xPos, _yPos, 0]; // Create a civilian zombie private _zombie = "C_man_1" createUnit [_zombiePos, [], 0, "CAN_COLLIDE"]; _zombie setBehaviour "CARELESS"; _zombie enableAI "TARGET"; _zombie forceSpeed 0.5; _zombie switchMove "AmovPercMstpSnonWnonDnon"; _zombie say3D "Zombie_Groan_Sound"; }; // Call the function to create the civilian zombie call ZEPT_fnc_createCivilianZombie; }; If anyone got an ideea why this is not working i am happy to hear, this will change PUB zeus if we get it working. Edit: i also tried without the line : private _zombie = "C_man_1" createUnit [_zombiePos, [], 0, "CAN_COLLIDE"]; and made the script into: Quote MAZ_ZEPT_fnc_fullMoon = { ZEPT_fnc_createCivilian = { private _modulePos = getPos thisModule; //Civilian class name private _civilianClass = "C_man_1"; private _civilian = _civilianClass createUnit [_modulePos, [], 0, "CAN_COLLIDE"]; _civilian setFriend [west, 0]; _civilian setFriend [east, 0]; _civilian setFriend [independent, 0]; _civilian setBehaviour "CARELESS"; _civilian enableAI "TARGET"; _civilian forceSpeed 0.5; // Optionally, you can set the civilian's animation here. // _civilian switchMove "AmovPercMstpSnonWnonDnon"; // Optionally, play a sound for the civilian. // _civilian playMove "Zombie_Groan_Sound"; }; // Call the function to create the civilian unit call ZEPT_fnc_createCivilian; }; Main issue, the module made for zeus in EZM, when placed, i get the following error : this line "private _civilian = _civilianClass createUnit [_modulePos, [], 0, "CAN_COLLIDE"];" Error missing ; Share this post Link to post Share on other sites
Harzach 2518 Posted September 9, 2023 On 9/6/2023 at 9:01 PM, Andreilarazboi said: private _modulePos = getPos this; // Extract X and Y coordinates from _modulePos private _xPos = _modulePos select 0; private _yPos = _modulePos select 1; // Create an array for the zombie's position private _zombiePos = [_xPos, _yPos, 0]; Why? On 9/6/2023 at 9:01 PM, Andreilarazboi said: private _zombie = "C_man_1" createUnit [_zombiePos, [], 0, "CAN_COLLIDE"]; This isn't 'Nam, there are rules. https://community.bistudio.com/wiki/createUnit Quote Syntax: type createUnit [position, group, init, skill, rank] Quote Return Value: ⚠Nothing - This syntax does not return a unit reference! Though you actually seem to be mixing syntaxes. Share this post Link to post Share on other sites