Is_Object_Visible explanation [message #469223] |
Wed, 13 June 2012 09:40 |
[KH]LordOfDeath
Messages: 10 Registered: March 2008 Location: Germany
Karma: 0
|
Recruit |
|
|
Hey i need a little explanation how to use "Is_Object_Visible(GameObject *Obj,GameObject *Visible);" function correctly
i wanna check if a player is NOT visible (spy) but i dont get the 2 parameters thing
1 parameter is the player GameObject right? but whats the other
if here is some1 who can tell me how to get if a player is visible or not visible pls feel free to reply
LordOfDeath
|
|
|
|
Re: Is_Object_Visible explanation [message #469226 is a reply to message #469223] |
Wed, 13 June 2012 10:09 |
[KH]LordOfDeath
Messages: 10 Registered: March 2008 Location: Germany
Karma: 0
|
Recruit |
|
|
thx for the fast reply^^
is there a way just to check if a player is visible without an object who "looks" to the player?
i want let the spy can read the enemie's team chat
but i needa check to prevent normal SBHs to get the enemy team msgs
my idea to check for spy if objekt is created is down xD
its cus object gets created and after this it get its invisible status so i cant use it -.-
i think about edit the ssgm crate source to write the spy player id in to a file where the chat hook get its "spy info" what do i after spy is dead? i can recheck on the object destroyed or player leave event. but how can i single check the visibility of a player?
is my idea possible to send enemie's teamchat to a spy? xD if not i let the project die^^
EDIT: thx for the line ill check later^^
|
|
|
|
Re: Is_Object_Visible explanation [message #469242 is a reply to message #469223] |
Wed, 13 June 2012 14:35 |
iRANian
Messages: 4308 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
Is_Visible() refers to the ability of objects with AI on them (e.g. turrets and the Obelisk) to "see" an object and thereby target it.
Is_Rendered() can be used to check if an object is rendered or not.
Is_Stealth() will tell you if an object is stealthed or not.
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
|
|
|
Re: Is_Object_Visible explanation [message #469246 is a reply to message #469223] |
Wed, 13 June 2012 15:07 |
|
Whitedragon
Messages: 832 Registered: February 2003 Location: California
Karma: 1
|
Colonel |
|
|
Put this in a chat hook and it will send the enemy's team chat to any players that Commands->Set_Is_Visible has been used on.
if (Type == TEXT_MESSAGE_TEAM) {
int Team = Get_Player_Team(ID);
cScTextObj *ChatEvent = 0;
for (SLNode<SoldierGameObj> *z = GameObjManager::StarGameObjList.Head();z;z = z->Next()) {
SoldierGameObj *Soldier = z->Data();
if (!Soldier->Is_Visible() && Soldier->Get_Player_Type() != Team) {
if (!ChatEvent) {
ChatEvent = Send_Client_Text(Msg,TEXT_MESSAGE_TEAM,false,ID,-1,false,false);
}
ChatEvent->Set_Object_Dirty_Bits(Get_Player_ID(Soldier),NetworkObjectClass::BIT_CREATION);
}
}
}
Black-Cell.net
Network Administrator (2003 - )
DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )
Dragonade, Renegade's first server side modification
Lead coder (2005 - )
|
|
|