The Exiled

Shunned by Man, Accepted by Gods
* FAQ    * Search   * Members
* Login   * Register
It is currently Thu Mar 28, 2024 9:29 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 2 guests
Author
Message
TE-Braveskin

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
Reply with quote
 
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.


 Top Offline
Profile
Author
Message
TE-Kalidor


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


Image
Image
Pengwin wrote:
Hmm
 Top Offline
Profile YIM
Author
Message
TE-Braveskin

Joined: Thu Aug 11, 2005 3:28 am
Posts: 1176
Post Posted: Wed Nov 23, 2005 11:10 pm    Post subject:
Reply with quote
 
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 © 2000, 2002, 2005, 2007 phpBB Group