|
|
It is currently Thu May 16, 2024 11:59 am
|
View unanswered posts | View active topics
|
|
|
|
|
Users browsing this forum: No registered users and 1 guest |
|
|
|
|
|
|
|
|
|
Author |
Message |
Joined: Thu Aug 11, 2005 3:28 am Posts: 1176
|
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("@%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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
| |