|
|
It is currently Tue May 21, 2024 12:40 pm
|
View unanswered posts | View active topics
|
|
|
|
|
Users browsing this forum: No registered users and 0 guests |
|
|
|
|
|
|
|
|
|
Author |
Message |
TE-Shugo
Joined: Mon Sep 05, 2005 12:21 am Posts: 70 Location: YaY ArEa, CaLiForNia
|
Posted: Fri Dec 30, 2005 9:59 pm Post subject:
|
|
|
umm i think you would have to open
objectives.cs inside the mod
and play around with this
Code: | function TowerSwitch::onCollision(%this, %object) { //echo("switch collision ", %object); if(getObjectType(%object) != "Player") return;
if(Player::isDead(%object)) return;
%playerTeam = GameBase::getTeam(%object); %oldTeam = GameBase::getTeam(%this); if(%oldTeam == %playerTeam) return;
%this.trainingObjectiveComplete = true; %playerClient = Player::getClient(%object); %touchClientName = Client::getName(%playerClient); %group = GetGroup(%this); Group::iterateRecursive(%group, GameBase::setTeam, %playerTeam);
%dropPoints = nameToID(%group @ "/DropPoints"); %oldDropSet = nameToID("MissionCleanup/TeamDrops" @ %oldTeam); %newDropSet = nameToID("MissionCleanup/TeamDrops" @ %playerTeam);
$deltaTeamScore[%oldTeam] -= %this.deltaTeamScore; $deltaTeamScore[%playerTeam] += %this.deltaTeamScore; $teamScore[%oldTeam] -= %this.scoreValue; $teamScore[%playerTeam] += %this.scoreValue;
if(%dropPoints != -1) { for(%i = 0; (%dropPoint = Group::getObject(%dropPoints, %i)) != -1; %i++) { if(%oldDropSet != -1) removeFromSet(%oldDropSet, %dropPoint); addToSet(%newDropSet, %dropPoint); } }
if(%oldTeam == -1) { MessageAllExcept(%playerClient, 0, %touchClientName @ " claimed " @ %this.objectiveName @ " for the " @ getTeamName(%playerTeam) @ " team!"); Client::sendMessage(%playerClient, 0, "You claimed " @ %this.objectiveName @ " for the " @ getTeamName(%playerTeam) @ " team!"); } else { if(%this.objectiveLine) { MessageAllExcept(%playerClient, 0, %touchClientName @ " captured " @ %this.objectiveName @ " from the " @ getTeamName(%oldTeam) @ " team!"); Client::sendMessage(%playerClient, 0, "You captured " @ %this.objectiveName @ " from the " @ getTeamName(%oldTeam) @ " team!"); %this.numSwitchTeams++; schedule("TowerSwitch::timeLimitCheckPoints(" @ %this @ "," @ %playerClient @ "," @ %this.numSwitchTeams @ ");",60); } } if(%this.objectiveLine) { TeamMessages(1, %playerTeam, "Your team has taken an objective.~wCapturedTower.wav"); TeamMessages(0, %playerTeam, "The " @ getTeamName(%playerTeam) @ " has taken an objective."); if(%oldTeam != -1) TeamMessages(1, %oldTeam, "The " @ getTeamName(%playerTeam) @ " team has taken your objective.~wLostTower.wav"); ObjectiveMission::ObjectiveChanged(%this); } ObjectiveMission::checkScoreLimit(); } |
Last edited by TE-Shugo on Fri Dec 30, 2005 10:00 pm, edited 1 time in total.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
| |