Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
What to send ? #149085
08/19/07 21:20
08/19/07 21:20
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline OP
User
demiGod  Offline OP
User

Joined: Mar 2006
Posts: 752
Portugal
Hi, sorry but i have not much experience with MP.

The code below works fine in the server, but in the clients the movement of the ball its not smooth and when is created the sprite splash, it appears first with its normal size, and then scales down like it should at first.

What do i need so send to the clients in order the movement and entity creation be allright?

Thanks.

Code:

vec_for_vertex (MY._SHOT_POS_X, my._weapon, 1465);
you = ent_create ("ball0.055.mdl", MY._SHOT_POS_X, PAINT_moveBall);
you.scale_x = 3;
you.scale_y = 3;
you.scale_z = 3;



Code:

function PAINT_moveBall()
{
var bullet_speed;
my.enable_impact = on;
my.enable_entity = on;
my.enable_block = on;
my.event = PAINT_removeBall;

my.pan = camera.pan;
my.tilt = camera.tilt;

bullet_speed.y = 0;
bullet_speed.x = 170 * time_step;
bullet_speed.z = 0;

while (my != null)
{
c_move (my, bullet_speed.x, nullvector, ignore_passable);
bullet_speed.z - = 0.5 * time_step;//0.08

SEND_SKILL( my.x, send_vec + send_all);
SEND_SKILL( my.pan, null);

wait (1);
}
}




Code:

function PAINT_removeBall()
{
VEC_ADD (TARGET.X, normal.X);
you = ent_create ("splat.tga", target.x, PAINT_createSplat);
VEC_TO_ANGLE (you.PAN, normal.x);
my.passable = on;
my.invisible = on;

SEND_SKILL (you.x, send_vec + send_all);
SEND_SKILL (you.pan, null);

sleep (2);
ent_remove (my);
}




Code:


function PAINT_createSplat()
{
my.oriented = on;
my.facing = off;
my.passable = on;
my.scale_x = 0.15;
my.scale_y = my.scale_x;
my.flare = on;
my.ambient = 50;
my.transparent = on;
my.alpha = 100;
}



Re: What to send ? [Re: demiGod] #149086
08/24/07 15:52
08/24/07 15:52
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline OP
User
demiGod  Offline OP
User

Joined: Mar 2006
Posts: 752
Portugal
hmmm... i see a great dynamism relating to multiplayer around here..


Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1