• 0
UraNuS

initserver.sqf Problems With Server Spawn Structures

Question

I use 3DEN Plugin for Items spawn(initServer.sqf) and SAVE similar but different code for the sqf... and not spawn!

In Editor with 3DEN Plugin:

Spoiler

dOe9zCL.jpg

IngameServer:

Spoiler

usWAlL7.jpg

I need to know in what way is correct...

position coords = [14594.1,16751.6,19.0761] or with spaces [14594.1, 16751.6, 19.0761]

turn coords = [[-0.707107,0.707107,0],[0,0,1]], or with spaces and without more square brackets:  [-0.707107, 0.707107, 0], [0, 0, 1],

, [false, false]],   or   , true], (and please explain what is this)

Examples:

OLD (initServer.sqf from last server files ) = ["Exile_Sign_Aircraft", [14594.1,16751.6,19.0761], [[-0.707107,0.707107,0],[0,0,1]], [false, false]],

NEW (code generated from last 3DEN Plugin ) = ["Exile_Sign_Aircraft", [14594.1, 16751.6, 19.0761], [-0.707107, 0.707107, 0], [0, 0, 1], true],

i need change to old style for work? i need only change  true], to  [false, false]], or what!?

is very annoying... HELP!

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

You do not have to refactor old code. If you generate it, you can use a different code to implement it. So if it only contains a single true, use this:

[
["Land_PortableLight_double_F", [4780.18, 2438.74, 11.5177], [0.985094, 0.157464, 0.0692507], [-0.0536288, -0.101384, 0.993401], true],
["Land_PortableLight_double_F", [4788.88, 2449.71, 11.1668], [-0.984217, -0.176966, 0], [0, 0, 1], true]
]
{
    private _vehicle = (_x select 0) createVehicle (_x select 1);
    _vehicle allowDamage false;
    _vehicle setPosWorld (_x select 1);
    _vehicle setVectorDirAndUp [_x select 2, _x select 3];
    _vehicle enableSimulationGlobal false;
    _vehicle enableDynamicSimulation (_x select 4);

}
forEach _vehicles;
(Note, this is for dynamic simulation if you use that. )

What is the difference? Depends on the code.
true = Just enables dynamic simulation alone or in some cases global simulation.
true, true (the double case) = Enables Dynamic/Global simulation and the second true enables Damage usually. 

So there is no difference, it appears that you do not know much of what general code does and I would suggest you take the time to learn this first. All the exporter does is export the coordinates and options. Then the last bit of code loops through every object and sets the parameters of each object and spawns it in the world. In this case the difference is whether damage is enabled. You can easily figure this out yourself if you take a look at the last bit of code and which part of the array the code selects.

Some other notes:
Spaces before values don't matter so there is no need to state it again. The extra set of squarebrackets around rotation (turning) is just for organisation.

Cheers mate, let me know if I need to clarify anything.

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

yep now i uses M3editor plugin...

and the code generaed works fine,,, 3DENplugin need UPDATEEE!!

P.D... please explain what is this: , [false, false]], what modify this parameters...

Edited by UraNuS

Share this post


Link to post
Share on other sites
  • 0

I told you.
 

Quote

What is the difference? Depends on the code.
true = Just enables dynamic simulation alone or in some cases global simulation.
true, true (the double case) = Enables Dynamic/Global simulation and the second true enables Damage usually. 

So to change these in the editor. Select the item and enable/disable damage and enable/disable simulation.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.