Hi!
I'm in the making of a multiplayer mission where four players are survivors and one player a "monster".
The "monster", named The Lurker, has a few abilities that I've made with scripts and they are executed by addAction.
These scripts works perfectly when I host a game and play as The Lurker. But when one of my fellow mates are playing, the script only runs once and doesnt repeat itself.
Example of a script:
trigman2 setPos (getPos tp2_1);
lurker switchMove "AwopPercMstpSgthWnonDnon_end";
lurker say "attack";
if (lurker distance man1 < 3) then { man1 SetDamage (damage man1 + 0.5);
};
if (lurker distance man2 < 3) then { man2 SetDamage (damage man2 + 0.5);
};
if (lurker distance man3 < 3) then { man3 SetDamage (damage man3 + 0.5);
};
if (lurker distance man4 < 3) then { man4 SetDamage (damage man4 + 0.5);
};
(lurker) removeAction attack;
sleep 1;
trigman2 setPos (getPos tp2_2);
In order to add some balance. I had to make sure the addaction couldn't be executed all the time so I (
because I'm not good at scripting, this was my only solution.) created a unit (
trigman2) who's teleporting in and out of a trigger area. When trigman2 is teleporting back, the addaction is once more available for The Lurker, making it possible to use "attack!" again.
As I said. Whenever I play, it works flawless. But not when someone else is playing. Same goes for hideObjectGlobal. It works for me but not for the other players.
Any help is much appreciated! :)