Jump to content
Sign in to follow this  
-STO-Badblood

Setdir bug?

Recommended Posts

I am wondering if anyone knows if this is a bug.

- I create a fence using CreateVehicle. I then set it's location (I find you need to do this sometimes since the object does not always place exactly where specified in the createVehicle command.) I then set the fence direction to 90 degrees. Problem - It stays at 0 degrees.

Code EX:

--------------------------------------------------------

#START

;// Create the fence

   Fence1 = "WireFence" CreateVehicle [_posX, _posY, 0]

;// Set the location incase it was off during creation

  Fence1 SetPos [_posX, _posY, 0]

;// Set it's direction

   Fence1 SetDir 90

;// Ask the game what position it sees it at

   _ActualDirection = GetDir Fence1

   _mes = format ["Fence direction = %1", _ActualDirection]

   hint _mes

exit

---------------------------------------------------------

Hint output is ----> Fence direction = 0

The fence appears in the zero direction in the game.

I tried using CamCreate, adding delays, leaving out the SetDir step etc..

I am createing a training map with many ranges. I create each range and remove them by script to minimize the lag caused by multiple objects. Some objects work OK (ex/ ammocrates) but this fence seems to have a bug.

Any help anyone can offer will be greatly appreciated!

- SFC BadBlood [sTO]

Share this post


Link to post
Share on other sites

Try fence1 setdir 0

I'm not sure if it was the wire fence or another object, but one of those is kinda odd. Setting it to 0 makes it look like its at 90, and seteting it at 90 makes it look like it's a zero.

P.S. In scripts I see a lot of "%1" exactly what does that do?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">P.S.  In scripts I see a lot of "%1"  exactly what does that do?

<span id='postcolor'>

this for example:

hint format ["%1",name player]

makes the name of the player show in a hint.

hint format ["%1", getdir player]

show the direction of the player in a hint.

%1 will become the result of the following text.

hint format ["%1 %2 %3","a","b","c"]

hints a b c

Share this post


Link to post
Share on other sites

Harnu - I did try setting it to 0. Still with no luck. Just seems that you can't set the direction on a wirefence when added by CreateVehicle or CamCreate.

I'm curious to find out if anyone else has that problem or if it's just on my system.

Thanks for the help. Greatly appreciated!

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  

×