Author Topic: Zone Blocking; Solved.  (Read 2837 times)

0 Members and 1 Guest are viewing this topic.

Lidge Farkley

  • Uber Menace
  • *******
  • Posts: 1,357
  • Reputation: +2/-3
    • http://www.angelfire.com/ca2/psychosworld2/
Zone Blocking; Solved.
« on: October 12, 2003 11:23 pm CDT »
When tents are deployed, they need to check to see what kind of terrain they are being deployed on, just like renegades tribes checks terrain vs structure with blast walls.

If a tent is being deployed on a building it will not allow the deployment of the tent.

If a tent is being deployed on the map terrain then it will be allowed.

It doesn't make much sense to make a campsite/tent inside a structure as the elements are already off of you, so this would be justified in that instance.

This would solve the problem with people deploying tents inside uber and blocking the tunnell or the teleporter, as well as deploying tents in many other places (minotaurs, den, etc..)

I don't know how to implement it though. :-D
« Last Edit: December 31, 1969 06:00 pm CST by Lidge Farkley »
Lend your heart unto the divine mineral TOPAZ;
from which our reverent hearts and minds sprang.
Also Known As:  Alcoholic 007
My Page of tribes Tools and Helpful "FAQ" Stuff

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #1 on: October 13, 2003 05:45 pm CDT »
Code: [Select]
if (%obj != "SimTerrain")
           return;


Problem solved
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

Pecker

  • Server Mommy
  • Uber Menace
  • ******
  • Posts: 1,704
  • Reputation: +0/-0
(No subject)
« Reply #2 on: October 13, 2003 06:02 pm CDT »
From eViL:

for any and all Natural Selection players.... we know the perfect solution, how about a /stuck or #stuck command for players to use which is able to push the player out of a stuck position such as a tent blocking uber.
« Last Edit: December 31, 1969 06:00 pm CST by Pecker »

Susan

  • Goblin Pup
  • *
  • Posts: 13
  • Reputation: +0/-0
(No subject)
« Reply #3 on: November 1, 2003 10:13 pm CST »
You could get really creative, and have the tent destroyable. That way, anyone could come along and hack up the tent.
Or go a step farther and do a check for objects in a set distance from the tent.

Code: [Select]
if(%w1 == "#camp")
{
if(Player::getItemCount(%TrueClientId, Tent))
{
%camp = nameToId("MissionCleanup\\Camp" @ %TrueClientId);
if(%camp == -1)
{
if(fetchData(%TrueClientId, "zone") == "")
{
%a = distance to look for stuff
%set=newObject("set",SimSet);
%num=containerBoxFillSet(%set,$StaticObjectType | $ItemObjectType ,%pos,%a,%a,%a,%a);

if(!%num)
{
Client::sendMessage(%TrueClientId, $MsgBeige, "Setting up camp...");
%pos = GameBase::getPosition(%TrueClientId);

Player::decItemCount(%TrueClientId, Tent);
RefreshAll(%TrueClientId);
%group = newObject("Camp" @ %TrueClientId, SimGroup);
addToSet("MissionCleanup", %group);

schedule("DoCampSetup(" @ %TrueClientId @ ", 1, \"" @ %pos @ "\");", 2, %group);
schedule("DoCampSetup(" @ %TrueClientId @ ", 2, \"" @ %pos @ "\");", 10, %group);
schedule("DoCampSetup(" @ %TrueClientId @ ", 3, \"" @ %pos @ "\");", 17, %group);
schedule("DoCampSetup(" @ %TrueClientId @ ", 4, \"" @ %pos @ "\");", 20, %group);
}
else
Client::sendMessage(%TrueClientId, $MsgRed, "Stop trying to block places.");

deleteObject(%set);
}
else
Client::sendMessage(%TrueClientId, $MsgRed, "You can't set up a camp here.");
}
else
Client::sendMessage(%TrueClientId, $MsgRed, "You already have a camp setup somewhere.");
}
else
Client::sendMessage(%TrueClientId, $MsgRed, "You aren't carrying a tent.");

return;
}

or something like that.
« Last Edit: December 31, 1969 06:00 pm CST by Susan »