Jump to content
Sign in to follow this  
Norbak

Setpos position?

Recommended Posts

Can anyone tell me how to make something like this...(but working, not this):

_pos = player1;

_pos = player2;

_pos = player3;

object1 = setpos position player1;

object1 = setpos position player2;

object1 = setpos position player3;

only on a file like? :

Object1 = setpos position [player1,player2,player3]; //object at position p1 p2 p3 at same time??

thank you

Share this post


Link to post
Share on other sites

Better to just describe what you want to happen. It seems that you want to create new objects at, or move existing objects to, multiple positions.

Let's suppose you have three objects (object1, object2, and object3), and three players (player1, player2, and player3). To move each object to its respective player (1 to 1, 2 to 2, 3 to 3), you want something like this:

private ["_object","_player"];

_object = [object1, object2, object3];
_player = [player1, player2, player3];

for "_i" from 0 to 2 do {
(_object select _i) setPos position (_player select _i);
};

Not tested. Also keep in mind that this moves the object to the player's exact position - you might want to offset it a little bit to avoid collision issues.

If you want to create new objects instead, you want something like this:

private ["_player","_name","_object"];

_player = [player1, player2, player3];

for "_i" from 0 to 1 do {
_name = "object" + str(_i + 1);		
   _object = "OBJECT_CLASS_NAME" createVehicle position (_player select _i);
_object setVehicleVarName _name;
};

Again, not tested. I think it might also be considered best practice to use createVehicle array instead of plain old createVehicle.

Share this post


Link to post
Share on other sites

It's hard to say. I'd love to make the LK nuke script working on MP and so another players could see the nuke explosion and the rest of the effects.

It's insane. I'm very frustrated.

Share this post


Link to post
Share on other sites

OK, that's entirely different, and involves multiplayer coding. I'm not familiar with the script you mention, and I am certainly no MP coding expert. Or any kind of coding expert, for that matter.

Share this post


Link to post
Share on other sites

Place an ammo box on the map and name it box1. Give the box a placement radius of 500 meters.

Place a soldier on the map and name him blue1.

In the init of the soldier write this...........blue1 setpos (getpos box1);

When you start the mission the box will start in a 500m radius - and the soldier will always start standing on the box.

==============================================================================

In your case you seem to want to place the soldier and have the box start where the soldier is. In which case you reverse the order of the code:

box1 setpos (getpos blue1);

.

Edited by Joe98

Share this post


Link to post
Share on other sites

The LK Nuke seems to work fine in MP, as it is included in GITS Evolution and other MP missions. Maybe grab GITS Evo and see how they accomplished it?

Share this post


Link to post
Share on other sites

That's a nice idea. I'll give a look. Thanks man.

Damn. I can't open that .PBO with PBO View.

Share this post


Link to post
Share on other sites

Something wrong on your end, then. Check your PMs.

Share this post


Link to post
Share on other sites

That nuke in GITS doesn't work for me.

LK really does in MP but only Radzone with Radiation marker, not the nuke,ash and envi effects.

Share this post


Link to post
Share on other sites

You need to sort through everything in the "nuke" folder for all items that need to be defined elsewhere - for example, CfgSounds in description.ext. Alternately, look through all init/description/defines/etc files for anything pertaining to LK Nuke effects. It isn't going to be easy.

Share this post


Link to post
Share on other sites

Ok. Changing markers is easy. Createmarkerlocal => createmarker. It's done. Now everybody can see te radiation zone with MP damage.

Sounds are easy aswell. I used SAY command at every player,so they can hear the sound when it explodes. Another way could be place the SAY3D at the point of explotion but the noise isn't that heavy,especially from 1000 meters away...

Nuke ,envi and ash is harder.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×