Home   Help Search Login Register  

Author Topic: Random placed bases??  (Read 524 times)

0 Members and 1 Guest are viewing this topic.

DC10_starvinmarvin

  • Guest
Random placed bases??
« on: 27 Jul 2003, 21:20:09 »
I want to create a mission where you are to locate a hidden vietcong camp in the jungle. is there any way to randomize the position of a whole camp or is that only possible for every single unit?

Offline DrStrangelove

  • Members
  • *
  • Mr.Creative
Re:Random placed bases??
« Reply #1 on: 27 Jul 2003, 21:40:37 »
No, it's possible.

a.) Create the main building of your base. Name it VCbase or something. Set the placement radius to 1000m, but make sure that the radius doesn't touch a river or see (you don't want to built a base there, i think).

b.) Create the other things of the base, like sandbags etc. You don't need to align them in the editor, because you'll script them at the right position - depending on the main building called VCbase. So wherever VCbase is built, all other things of the base will follow it and appear at the right place.

To do this, careful scripting with coordinates and setpos command is required.

Create these objects for a little example:

1.) Mashtent (east or whatever)
Name: ebaseA1
Init-line: this setpos [getpos this select 0, getpos this select 1, (getpos this select 2) -3.8]

2.) Fence
Init-line: this setpos [(getpos ebaseA1 select 0)+5, (getpos ebaseA1 select 1)+2.6, (getpos this select 2)]

3.) M2 StaticMG
Init-line: this setDir 45; this setpos [(getpos ebaseA1 select 0)+6.4, (getpos ebaseA1 select 1)+5.6, (getpos this select 2)-0.2]

4.) Fence
Init-line: this setpos [(getpos ebaseA1 select 0)+6.1, (getpos ebaseA1 select 1)+4.1, (getpos this select 2)]

5.) Fence
Init-line: this setpos [(getpos ebaseA1 select 0)+4.6, (getpos ebaseA1 select 1)+5, (getpos this select 2)]

6.) Fence
Init-line: this setpos [(getpos ebaseB1 select 0)-2.7, (getpos ebaseB1 select 1)+1.9, (getpos this select 2)]



Hope this helps

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Random placed bases??
« Reply #2 on: 28 Jul 2003, 00:50:27 »
Alternatively, place markers around the map at the possible locations for the base.     Group the main building to ALL of the markers and the game will select one location at random.    Other buildings should be placed relative to the main building as DrStrangelove explains.
Plenty of reviewed ArmA missions for you to play

Offline axek

  • Members
  • *
  • I'm a llama!
Re:Random placed bases??
« Reply #3 on: 28 Jul 2003, 01:50:53 »
I'm currently making a multiplayer mission that includes this type of functionality.

You can download the source from this thread at opflashpoint.org .

My mission is still work in progress, but the section of picking a base location works fine.

The map has a bunch of invisible markers and then I randomly pick four of them for the base locations for that particular round.

Regards,
Axek.
« Last Edit: 28 Jul 2003, 01:56:00 by axek »

DC10_starvinmarvin

  • Guest
Re:Random placed bases??
« Reply #4 on: 28 Jul 2003, 17:37:27 »
Hey thanks alot guys! you are really helpfull!

Cheers // Marvin