Jump to content
Sign in to follow this  
CarlGustaffa

Odd stretchy bug with mash tents

Recommended Posts

Hi

I'm modding Domination for own use, and tried replacing the "mobilerespawn" M113 medic vehicles with MASH tents. System works ok for now, but I had this weird bug where the tent was stretched several meters into the air.

Parts of the "script" goes something like:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_player = _this select 0;

_worldpos = _player modelToWorld [0.0,7.0,0];

_dummy = "HeliHEmpty" createVehicle _worldpos;

_worldpos = getPos _dummy;

_object setDir (getDir _player)-180;

_object setPos getPos _dummy;

sleep 2;

_object setDamage 0;

hint format ["%1 has been moved to a new position.", _mashno];

Also, as a side "bug" (probably only having to do with my own limited knowlegde), why does the following not work in multiplayer, where only two medics are given the action:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_mashno = if(_player==uB3) then {"MASH Bravo"} else {"MASH Charlie"};

_object = if(_player==uB3) then {uMASH1} else {uMASH2};

...while switch do seems to work just fine:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

switch (_player) do

{

   case uB3:

   {

       _mashno = "MASH Bravo";

       _object = uMASH1;

   };

   case uC3:

   {

       _mashno = "MASH Charlie";

       _object = uMASH2;

   };

};

That is, when I'm playing uB3 in the first example, it does work also on dedi server, but when I'm playing uC3 all I'm getting is some scalar bool error in a hint referring to _mashno and nothing is moved.

Any ideas?

Here is a picture of the stretchy bug:

2308501806_e181e42e99_o.jpg

Share this post


Link to post
Share on other sites

SideBug: I think the syntax in your sqs if script code is invalid. It should be:

if (condition) then {_variable = "STRING"} else {_variable = "STRING"}

rather than

_variable = if (condition) then {"STRING"} else {"STRING"}

MainBug: Try deleting the helipad before placing the tent on it. Does the bug happen every time you move it, or just the first?

Share this post


Link to post
Share on other sites

Not the first time, not everytime. Actually it's pretty hard to reproduce. We've had the bug once during online session, and once (this time) during self testing.

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  

×