|
You last visited: Today at 09:16
Advertisement
Lil help here.
Discussion on Lil help here. within the CO2 Private Server forum part of the Conquer Online 2 category.
12/06/2011, 02:54
|
#1
|
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
|
Lil help here.
Can someone tell me what do you call this effect in clientside.?
I cant find it.
help would be appreciated
|
|
|
12/06/2011, 03:01
|
#2
|
elite*gold: 0
Join Date: Sep 2006
Posts: 248
Received Thanks: 117
|
The big blue one or the white one?
|
|
|
12/06/2011, 03:04
|
#3
|
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
|
The white one
|
|
|
12/06/2011, 03:06
|
#4
|
elite*gold: 0
Join Date: Sep 2006
Posts: 248
Received Thanks: 117
|
Quote:
Originally Posted by -Sensei-
The white one 
|
Not 100% sure, but since noone else seems to be piping up, give me a few to locate it.
Well, I apologize, I was unable to find it. I'm sure someone here knows.
|
|
|
12/06/2011, 05:28
|
#5
|
elite*gold: 0
Join Date: Aug 2010
Posts: 992
Received Thanks: 1,110
|
its a string packet 1015...
effect name = moveback
|
|
|
12/06/2011, 06:42
|
#6
|
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
|
Thank you so much
btw how can i make it work others can see the effect, i can only see the effect in my screen.
Heres the code
Quote:
_String str = new _String(true);
str.UID = client.Entity.UID;
str.TextsCount = 1;
str.Type = _String.Effect;
str.Texts.Add("moveback");
client.Entity.Owner.SendScreen(str, true);
|
|
|
|
12/09/2011, 08:00
|
#7
|
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
|
#bump
|
|
|
12/09/2011, 08:38
|
#8
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by -Sensei-
Thank you so much
btw how can i make it work others can see the effect, i can only see the effect in my screen.
Heres the code
|
Notice, I don't know what the client classes are etc. but something a long these lines.
Code:
_String str = new _String(true);
str.UID = client.Entity.UID;
str.TextsCount = 1;
str.Type = _String.Effect;
str.Texts.Add("moveback");
foreach (Client sendto in ClientDictionary)
{
sendto.Entity.Owner.SendScreen(str, true);
}
What I would do is making a global method to send globalpackets.
|
|
|
12/09/2011, 09:45
|
#9
|
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
|
Quote:
Originally Posted by BaussHacker
Notice, I don't know what the client classes are etc. but something a long these lines.
Code:
_String str = new _String(true);
str.UID = client.Entity.UID;
str.TextsCount = 1;
str.Type = _String.Effect;
str.Texts.Add("moveback");
foreach (Client sendto in ClientDictionary)
{
sendto.Entity.Owner.SendScreen(str, true);
}
What I would do is making a global method to send globalpackets.
|
I made it like this
Code:
_String str = new _String(true);
str.UID = client.Entity.UID;
str.TextsCount = 1;
str.Type = _String.Effect;
str.Texts.Add("moveback");
foreach (Client.GameState sendto in Conquer_Online_Server.ServerBase.Kernel.GamePool.Values)
{
sendto.Entity.Owner.SendScreen(str, true);
}
break;
and it works the same to my old code.
|
|
|
12/09/2011, 10:20
|
#10
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by -Sensei-
I made it like this
Code:
_String str = new _String(true);
str.UID = client.Entity.UID;
str.TextsCount = 1;
str.Type = _String.Effect;
str.Texts.Add("moveback");
foreach (Client.GameState sendto in Conquer_Online_Server.ServerBase.Kernel.GamePool.Values)
{
sendto.Entity.Owner.SendScreen(str, true);
}
break;
and it works the same to my old code.
|
Could you post your SendScreen method?
|
|
|
12/09/2011, 10:31
|
#11
|
elite*gold: 0
Join Date: Oct 2011
Posts: 267
Received Thanks: 59
|
Quote:
Originally Posted by BaussHacker
Could you post your SendScreen method?
|
Here
PHP Code:
public void SendScreen(Interfaces.IPacket buffer, bool self)
{
foreach (Interfaces.IMapObject obj in Screen.Objects)
{
if (obj == null) continue;
if (obj.MapObjType == Game.MapObjectType.Player)
{
GameState client = obj.Owner as GameState;
client.Send(buffer);
}
}
if (self)
Send(buffer);
}
|
|
|
12/09/2011, 11:05
|
#12
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Try set the true to false.
|
|
|
12/09/2011, 11:17
|
#13
|
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
|
Quote:
foreach (Client.GameState sendto in Conquer_Online_Server.ServerBase.Kernel.GamePool.V alues)
{
sendto.Entity.Owner.SendScreen(str, true);
}
|
Lol no. You don`t loop through ALL game clients and send the effect to ALL players on ALL players` screen. You just do MyCharacter.SendScreen(str, true) or however it works in your source. That foreach loop alone is a bug.
|
|
|
12/09/2011, 11:24
|
#14
|
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
|
Quote:
Originally Posted by KraHen
Lol no. You don`t loop through ALL game clients and send the effect to ALL players on ALL players` screen. You just do MyCharacter.SendScreen(str, true) or however it works in your source. That foreach loop alone is a bug.
|
Oh yeah, should have mention that.
|
|
|
12/09/2011, 11:39
|
#15
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,191
|
Normally, you would do something like this...
If you want the effect to appear on everyone's own character:
Code:
StringPacket strPacket = new StringPacket(herp derp);
strPacket.Type = whateverTheFuckThisEnumEquals;
strPacket.Text.Add("effect");
foreach (Client client in Kernel.GamePool.Values)
{
strPacket.UID = client.Identity;
client.Send(strPacket);
}
If you want the effect to appear on only your own character from everyone else's view:
Code:
StringPacket strPacket = new StringPacket(herp derp);
strPacket.Type = whateverTheFuckThisEnumEquals;
strPacket.Text.Add("effect");
strPacket.UID = client.Identity;
foreach (Client client in (screen data from the sending client))
{
client.Send(strPacket);
}
Edit: You probably use an interface if your using a smart source... so you would do something like...
Code:
foreach (IScreenObject client in (screen data from the sending client))
{
if (client.Flag == Flags.Player)
client.Send(strPacket);
}
|
|
|
All times are GMT +1. The time now is 09:17.
|
|