The Exiled
http://theexiled.pwnageservers.com/forum/

More of the help please. Its pretty advanced
http://theexiled.pwnageservers.com/forum/viewtopic.php?f=4&t=588
Page 1 of 1

Author:  TE-Braveskin [ Sun Oct 09, 2005 11:54 am ]
Post subject:  More of the help please. Its pretty advanced

Code:
function FrizbeeImage::onFire(%player,%otha)
{
        %item = "Frizbee";
      %clientId = Player::getClient(%player);
      GameBase::getLOSInfo(%player, 50);
      Player::decItemCount(%player,%item,1);
      %obj = newObject("","Item",%item,1,false);
        addToSet("MissionCleanup", %obj);
        %obj.isActive = true;
        %objpos = gamebase::getposition(%obj);
        schedule("CheckActivity("@%obj@",@"%objpos@");",0.1);
      %rot = GameBase::getRotation(%clientId);
      %closest = Vector::getDistance(GameBase::getPosition(%clientId),$los::position);
        echo(%closest);
      %vel = 50;
      %yz = GetWord(%rot,1)@" "@GetWord(%rot,2);
      GameBase::setRotation(%clientId,%x-0.4@" "@%yz);
      GameBase::throw(%obj, %player, %vel, false);
      GameBase::setRotation(%clientId,%rot);
}




function CheckActivity(%obj,%pos)
{
if(%pos != %pos)
{
%obj.isActive = true;
schedule("CheckActivity("@%obj@","@%pos@");",0.1);
}
else if(%pos == %pos)
{
%obj.isActive = false;
echo("Object: "@%obj@" lost movement.");
}
}


Yeah Ive got the item data. And I can throw the frizbee too. It works good but the activity doesnt. the first schedule gives me a syntax error.

Author:  TE-Kalidor [ Wed Nov 23, 2005 5:54 pm ]
Post subject: 

Where would you put this?(the code)

Author:  TE-Braveskin [ Wed Nov 23, 2005 11:10 pm ]
Post subject: 

oh, never mind about that. I fixed it like forever ago, it works GREAT.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/