same as privious topic about syncing

Started by [GoD]sinner, Jul 02, 2015, 05:35 AM

Previous topic - Next topic

[GoD]sinner

Example: - Beach ball in a swimming pool in starfish island. If a person moves the ball from initial position to final position, he see's it in final position, but for other persons it appears in initial position.(It is not synced)

So i tried to create the ball with following command.

CreateObject(256,player.World,player.Pos.x+1,player.Pos.y,player.Pos.z,255);

The object created succesfully. But it is static and not moving at all. It is like a immovable rock.

Any ideas creating a ball in vcmp please

Regards,
[GoD]sinner



DizzasTeR

I'm already working on it to make it alive using onObjectBump, the only other way is if vcmp gets the ability to create non-static maps which are synched and can be moved (eg. Objects like this ball )

[GoD]sinner

Thank You For your reply Doom_killer
I Think if we get the id of the default object ball, and simply change its position on script load it will sync i think.
or
Is there any function like cloning the default object ball?

DizzasTeR

Not exactly cloning, as I've said, currently the default game objects (like that ball ) are not synched between players which is why when you disturb the ball in your screen it remains the same for anyone else.

We will have to wait till VCMP gets support for such type of objects which  are synched and can be moved by touching them.

Otherwise you will have to give the ball motion indirectly by creating the ball using CreateObject then allow it to track bumps and using onObjectBump you code its motion.

Sebastian

To create (workable) featured objects, even if some are not synced, you should use .xml .
(for objects like glass, beachball, boxes, etc)

[GoD]sinner

Hey Guys,
I extracted beachball.txd and beachball.diff using gta med.
but i couldn't find the .col file.
i created beachball_unp.7z using only beachball.txd and beachall.diff.
and created Objects.xml
but on doing CreateObject (6000,0,FindPlayer(0).Pos,255);
nothing happened no object no errors.
but i crated beach ball using this:
CreateObject(526,0,FindPlayer.Pos,255);
Object created but cannot move it is like a rock.
Can some one tell me how to get the id of my created object.
so that i can do OnObjectBump command.
I mean i'm, stuck with how to find the object id.

MacTavish

#6
if (cmd == "cbb")
{
Bball <- CreateObject(526,0,player.Pos,255);
Bball.TrackingBumps = true;
}

In main.nut

function onObjectBump( object, player )
{
if ( object == Bball ) Bball.MoveTo(Vector(player.Pos.x, player.Pos.y+2,player.Pos.z),500);
}


I havent tried yet take a try

Edited

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P

DizzasTeR

MoveTo is not the function to use for this purpose., it will just move it upward, you need to use velocity.

[GoD]sinner

Thanks for the Reply Guys,

I think the best way is to create ball in 3ds Max and add it to the game.

Murdock

It would indeed be nice if objects marked with a object.Synced flag could be synced like vehicles, mainly dynamic objects like the beachball. However I think this has low priority for now, I do wish there were object attachment functions though

DizzasTeR

Quote from: Murdock on Jul 04, 2015, 04:15 PMI do wish there were object attachment functions though

You're not alone with this wish, some day VCMP Santas will drop these presents for us, lets wait!

[GoD]sinner

Guys Thank You for all your replies.

I tried modelling a ball with gmax, using max script downloaded from gtagarage to export.
but i get following error.

---------------------------
MAXScript Rollout Handler Exception
---------------------------
-- Runtime error: Feature not available: "fopen write mode"
---------------------------
OK   
---------------------------

Thijn

Why would you make another ball when there's already a ball in the game? It just isn't synced at this time.

[GoD]sinner

Thank You For your reply Thijn,
can please tell me how to sync the ball.

DeViL_JiN

Quote from: [GoD]sinner on Jul 08, 2015, 05:14 AMGuys Thank You for all your replies.

I tried modelling a ball with gmax, using max script downloaded from gtagarage to export.
but i get following error.

---------------------------
MAXScript Rollout Handler Exception
---------------------------
-- Runtime error: Feature not available: "fopen write mode"
---------------------------
OK   
---------------------------

you need another executable called "GTAmax" to export the models, it comes with latest Kam's script , Goto Gmax Script folder and then move to "GTA_TOOLS" you will see a file called "GTAmax" run it and it will automatically launch GMAX, happy exporting and if you don't have "GTAMax" then search for it on google.