Hey all.
As a learning scripter, i am still working on my TF2 Ai.
But to make it work as i want, i need to change a damn lot of the code.
Now to my questions.
I will keep this list of questions up-to-date right here, so don't worry, you won't answer an old question.
-1-
Can i do something like this?
Improved, thanks to Choneis.
No need for answers anymore.
datablock PlayerData(putainamehereZombie : PlayerStandardArmor)
{
//blahblahblahstandardstuffhere
primary = TF2Flamethrower;
};
function LordiciansAiMainZombie::SpecialAttack(%this,%onshot)
{
if(getsimtime() >= %this.lastspecial+3000 && %this.getstate() !$= "Dead")
{
%this.unmountimage(0);
%primary = %this.getdatablock().primary @ "image";
%this.mountimage(%primary, 0);
%ran = getrandom(-1,1);
%ran2 = getrandom(-1,1);
%this.setmovex(%ran);
%this.setmovey(%ran2);
schedule(0,0,BotShootMode,%this);
schedule(500,0,BotShootMode,%this);
schedule(1000,0,BotShootMode,%this);
schedule(1500,0,BotShootMode,%this);
%this.schedule(2800,clearmovex);
%this.schedule(2800,clearmovey);
%this.lastspecial = getsimtime();
}
}
The function will be situated in the server.cs and be packaged of course while the datablock will be in the Ai script itself.
Probably the (%primary)image is wrong, but i'd like to know if it's possible to do something like that and if yes, how?
Thanks in advance