|
You last visited: Today at 02:20
Advertisement
Making Effect World Side? (5165)
Discussion on Making Effect World Side? (5165) within the CO2 Private Server forum part of the Conquer Online 2 category.
02/23/2010, 07:03
|
#1
|
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
|
Making Effect World Side? (5165)
How would I make this code world side so that the world can see the firework or whatever effect i'm doing?
Code:
if (Cmd[0] == "/effect")
{
Game.World.Effect = Cmd[1];
foreach (Game.Character Player in Game.World.H_Chars.Values)
try
{
Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, Game.World.Effect));
}
catch { }
}
|
|
|
02/23/2010, 10:15
|
#2
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
That looks fine to me.
Although you might need Player.MyClient.FinshSend(); or whatever it is.
|
|
|
02/23/2010, 15:17
|
#3
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
|
Korvacs you dont need to as the source has a 10ms timer on it.
but yh it woulda decrease the delay
@newdawn
That code should just work
|
|
|
02/23/2010, 15:26
|
#4
|
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
|
Quote:
Originally Posted by ~Yuki~
Korvacs you dont need to as the source has a 10ms timer on it.
but yh it woulda decrease the delay
@newdawn
That code should just work
|
Well yah, the code does work, but it's client side. If it goes off, nobody else can see it. I want it so that if someone sets off I firework or gets married (or gets an effect as part of a quest even) everyone else can see it.
(Got to go to class- I'll respond in a bit)
|
|
|
02/23/2010, 17:19
|
#5
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
Do a loop through clients who can see the player and display the same effect to them (except at the x/y of the person using it)
|
|
|
02/23/2010, 18:26
|
#6
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Code:
if (Cmd[0] == "/effect")
{
Game.World.Effect = Cmd[1];
foreach (Game.Character Player in Game.World.H_Chars.Values)
{
Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, Game.World.Effect));
}
}
Hows this? I just removed the try catch and added brackets for the foreach.
|
|
|
02/23/2010, 19:34
|
#7
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
|
i woulda set it to PointDistance as i would not want ppl to see the effect if they arent in range / on other maps
|
|
|
02/24/2010, 00:01
|
#8
|
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
|
Quote:
Originally Posted by Korvacs
Code:
if (Cmd[0] == "/effect")
{
Game.World.Effect = Cmd[1];
foreach (Game.Character Player in Game.World.H_Chars.Values)
{
Player.MyClient.AddSend(Packets.String(Player.EntityID, 10, Game.World.Effect));
}
}
Hows this? I just removed the try catch and added brackets for the foreach.
|
Well, that does make it cleaner but it's still client sided.
Quote:
Originally Posted by pro4never
Do a loop through clients who can see the player and display the same effect to them (except at the x/y of the person using it)
|
How would I do a loop that would do that?
If I created a loop, wouldn't it just do it for the client it's coming from?
Quote:
Originally Posted by ~Yuki~
i woulda set it to PointDistance as i would not want ppl to see the effect if they arent in range / on other maps
|
How would I do that? =\
Can someone give me an example? This effect command is just a simple code that I can test it on. I have so many ideas but I really need help... so if anyone has an idea... PM me or respond please.. =s
|
|
|
02/24/2010, 00:14
|
#9
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
What sort of effect is it, it seems that your trying to make one stay with a character as it moves around.
What you posted, and what i modified it to will send the effect to everyone, and it will only work for there clients.
I assumed this was fine because you said they were fireworks...
|
|
|
02/24/2010, 03:13
|
#10
|
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
|
Quote:
Originally Posted by Korvacs
What sort of effect is it, it seems that your trying to make one stay with a character as it moves around.
What you posted, and what i modified it to will send the effect to everyone, and it will only work for there clients.
I assumed this was fine because you said they were fireworks...
|
Well that's the problem, it's not just fireworks...
here:
|
|
|
02/24/2010, 03:14
|
#11
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Since you have another thread about this I think one of them should be closed.
Gonna report it just so a moderator knows.
|
|
|
 |
Similar Threads
|
SRO's side effect All watch before u turn out like this
06/04/2009 - Silkroad Online - 5 Replies
YouTube - Angry German Kid Silkroad Online Version!! HILARIOUS!!
|
The side effect of No-Crc...
01/02/2009 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 8 Replies
Is apparently everyone going out and loading up on Nebular's bot. To be honest this is getting crazy annoying and looks much worse for the game. It might even be the cause of these connect problem everyone is having. I don't mind that a no-crc isn't out, but public updates to the bot should be stopped too imo.
|
The side effect of No-Crc...
01/01/2009 - Dekaron - 3 Replies
Is apparently everyone going out and loading up on Nebular's bot. To be honest this is getting crazy annoying and looks much worse for the game. It might even be the cause of these connect problem everyone is having. I don't mind that a no-crc isn't out, but public updates to the bot should be stopped too imo.
|
The humorous side of making a PvP or Leveling server!
10/16/2008 - CO2 Private Server - 9 Replies
Well, if you run a PvP server; Odds are the only people playing are;
* Yourself
* Friends
* People who lack the capability to connect to AcidCO
* People who haven't heard of AcidCO
And if you run a leveling ser-- oh wait, nobody competent enough is around anymore to code one of these properly (Except maybe Marcus on QO, I really don't know how good he is, so I won't say anything, but never the less he has Q/Steve helping him), never mind.
|
All times are GMT +1. The time now is 02:21.
|
|