Particle's Custom RPG

PCRPG Development => Development => Topic started by: Lidge Farkley on October 12, 2003 11:23 pm CDT

Title: Zone Blocking; Solved.
Post by: Lidge Farkley 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
Title:
Post by: UnderGod on October 13, 2003 05:45 pm CDT
Code: [Select]
if (%obj != "SimTerrain")
           return;


Problem solved
Title:
Post by: Pecker 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.
Title:
Post by: Susan 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.