The Exiled

Shunned by Man, Accepted by Gods
* FAQ    * Search   * Members
* Login   * Register
It is currently Mon Feb 17, 2020 1:19 am 

 View unanswered posts | View active topics


 Board index » General Area » Modding

Post new topic Reply to topic Users browsing this forum: No registered users and 1 guest
Author
Message
TE-Braveskin
Noble
Joined: Thu Aug 11, 2005 3:28 am
Posts: 1176
Post Posted: 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("@%[email protected]",@"%[email protected]");",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,%[email protected]" "@%yz);
      GameBase::throw(%obj, %player, %vel, false);
      GameBase::setRotation(%clientId,%rot);
}




function CheckActivity(%obj,%pos)
{
if(%pos != %pos)
{
%obj.isActive = true;
schedule("CheckActivity("@%[email protected]","@%[email protected]");",0.1);
}
else if(%pos == %pos)
{
%obj.isActive = false;
echo("Object: "@%[email protected]" 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.


 Top Offline
Profile
Author
Message
TE-Kalidor
Assassin

User avatar
Joined: Tue Jun 28, 2005 7:01 am
Posts: 1045
Location: StoneHenge
Post Posted: Wed Nov 23, 2005 5:54 pm    Post subject:
 
Where would you put this?(the code)


Image
Image
Pengwin wrote:
Hmm
 Top Offline
Profile YIM
Author
Message
TE-Braveskin
Noble
Joined: Thu Aug 11, 2005 3:28 am
Posts: 1176
Post Posted: Wed Nov 23, 2005 11:10 pm    Post subject:
 
oh, never mind about that. I fixed it like forever ago, it works GREAT.

 Top Offline
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic Board index » General Area » Modding
Previous topic :: Next topic  
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group