Home   Help Search Login Register  

Author Topic: Mobile camp Problems  (Read 753 times)

0 Members and 3 Guests are viewing this topic.

Offline Killzone

  • Members
  • *
  • War is the true Enemy
Mobile camp Problems
« on: 02 Oct 2003, 17:57:52 »
Hello,

I have made a script that allows a unit to build a small mobile camp anywhere they travel on the map. I used the createvehicle command for most of it. My problem is this:

All the created objects face in the same direction (north) and looks good but I would like to add another tent so that it faces in another direction. I have been using this command line for all my objects

tent = "campempty" createvehicle getPos b;  tent setpos [(getPos b select 0) - (4), (getPos b select 1) + (11.5), 1.3]

It builds the camp in relation to "b". Is there something I can add to this so that a second tent will face in another direction besides north? It does not matter what direction "b" is facing the camp always point north.  

I would like another tent a couple meters beside the firsth tent but facing in another direction. Plus I want to add fencing to this but if it all faces in the same direction it would not serve a very good purpose  ;)

As always, Thanks in advance  ;D
"Everyone dies so deal with it and move on"

                                                      ME

m21man

  • Guest
Re:Mobile camp Problems
« Reply #1 on: 02 Oct 2003, 18:05:05 »
tent setdir (value between 0 and 360)

Offline Killzone

  • Members
  • *
  • War is the true Enemy
Re:Mobile camp Problems
« Reply #2 on: 02 Oct 2003, 18:19:38 »
Damn!! that was a fast response. It worked great thanks a lot.  ;D ;D ;D
"Everyone dies so deal with it and move on"

                                                      ME

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Mobile camp Problems
« Reply #3 on: 02 Oct 2003, 18:44:06 »
As an alternative, you could use the mission editor to create the camp on one of the outlying islands.    That way you can set it up exactly as you like.     Then just setPos it in when you want.    Inamimate objects like tents don't cause much lag, so having them pre-created shouldn't slow things down.

Another possibility would be to learn about the command getDir.    This would allow you to camCreate the camp in any orientation you like, say based on the direction the player is facing.
Plenty of reviewed ArmA missions for you to play