Home   Help Search Login Register  

Author Topic: AToW "Advance" - Help Needed  (Read 2360 times)

0 Members and 1 Guest are viewing this topic.

Offline Spyder001

  • Members
  • *
AToW "Advance" - Help Needed
« on: 12 Jul 2010, 05:33:50 »
Hello, I am looking for some help with the next campaign over at ArmA ToW. Our current staff is is bogged down with the scripts from other parts of the campaign (resources, UN menu, forward spawning, etc.) as well as ACE development and real life.

Below is what is required to capture a sector in the mission. The code of a sector should be able to be copy and pasted so that someone with very limited scripting expirence can copy and paste, changing variable names (alpha_01, alpha_02, bravo_01, etc) to save time for the scripters.

I tried keeping this as short as possible.
_________________________



I. Sectors

A. Takistan is separated into a pre-determined number of sectors.
B. Sector code should be able to be copy + pasted to cut down on the work of the scripter

II. Zones

A. Each sector is split in half creating 2 zones.
B. Each zone contains one COP and battle position for each team.
C. A "invisible" line is drawn across the width of the zone. This comes into play later on.

III. COP (Combat Outpost)

A. Placement

  • COPs are pre-placed and remain in their position.
  • This is decided before the battle.

B. Capturing

  • Capturing an enemy COP is initialized by destroying the enemy's battle position in the zone.
  • This requires a team to push their battle position up 400m from the enemy's COP.
  • Once a team clears the enemy out of the COP, they can raise their flag.

C. Assets

  • Forward Spawning: If a team's battle position is within 400m (along axis of advance) of an enemy COP, forward spawning is disabled.
  • Ammo: Resupply vehicle can drop off loaded ammo crates.
  • Weapons: Resupply vehicle can drop off loaded weapon crates.
  • Communication Station: Required to have long range communications with friendly units (friendly markers to start, later on we will add A2TS).
  • Radar Station: Required to register enemy aircraft on the map.

IV. Battle Position

A. Creation

  • Each team starts from their COP.
  • To advance, a team must build a battle position a maximum of 400m from their COP (along axis of advance).
  • To build a battle position, a vehicle loaded with the building assets (ammo crate), must drop the cargo off at the desired location.
  • Using the action menu, a team builds a pre-designed battle position.
  • Another battle position can be created a maximum of 400m from the last battle position.
  • This is repeated until you are within 400m (along axis of advance) of an enemy's battle position (along axis of advance).
  • At which point, a team will need to destroy the enemy's battle position to place theirs.

B. Destruction

  • To destroy an enemy's battle position a team must prep the site (ammo crate; 60 second wait/ animation that can be canceled).
  • Once completed this will turn off the invincibility script and allow a satchel to destroy the enemy's battle position.
  • Once the ammo crate is destroyed any assets and fortifications around the battle position are deleted to maintain FPS.

C. Assets

  • Mortars: Can only be assembled inside the battle position.
  • Communications Relay: Required to maintain long range communications.
  • Ammo: Resupply vehicle can drop off loaded ammo crates.

V. Win Conditions

A. To win a zone, a team must destroy the enemy's battle position and secure the enemy's COP.
B. To win a sector, a team must secure both zones.

* Axis of advance is used for distance to stop teams from passing each other's battle positions and pushing to the other side of the zone (shown on image as green line).

** If a vehicles is destroyed, another cannot be spawned for 5 minutes

Below image describes the system more in depth.

« Last Edit: 16 Jul 2010, 08:17:05 by Spyder001 »

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: AToW "Advance" - Help Needed
« Reply #1 on: 12 Jul 2010, 23:20:36 »
generally on these forums people will not write a large piece of script for someone. You will have to show an honest effort of your own script that will probably not work. Then people will help you out using the material you already gave.
TS3 IP: tor.zebgames.com:9992

Offline Spyder001

  • Members
  • *
Re: AToW "Advance" - Help Needed
« Reply #2 on: 12 Jul 2010, 23:56:49 »
Yeah I was told a lot of code is involved lol. So it was suggested I break the mission into smaller parts. The main part i need is the axis of advance.

So how would I create this? I think that inside the COP there is a flag. From the flag a marker is placed that spans out far enough to cover that sector. This marker is used to get distance from where we will place the battle position.

  • So i need to dynamically place a marker at a pre-placed flag
  • Use this marker to measure distance from itself to an ammo crate (distance from the marker as a whole not just from it's center)
« Last Edit: 13 Jul 2010, 00:01:00 by Spyder001 »

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: AToW "Advance" - Help Needed
« Reply #3 on: 13 Jul 2010, 02:28:57 »
name the flag then get positions of named flag.
then create marker at the named flag position.

I am not sure how to do math with [x,y,z] coords.... maybe there is a getDistance command?

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

http://www.ofpec.com/COMREF/index.php?action=details&id=107&game=All
« Last Edit: 13 Jul 2010, 02:31:10 by Ironman »
TS3 IP: tor.zebgames.com:9992

Offline Spyder001

  • Members
  • *
Re: AToW "Advance" - Help Needed
« Reply #4 on: 13 Jul 2010, 05:46:07 »
Thanks Ironman I'll look into that. Another part I am working on requires this. Unfortunately it isn't working.

Code: [Select]
if (crate_zone01_sectorAlpha damage == 1)

then {

crate_zone01_sectorAlpha removeAction 2;
deleteVehicle object01_zone01_sectorAlpha;
deleteVehicle object02_zone01_sectorAlpha;
deleteVehicle object03_zone01_sectorAlpha;
deleteVehicle object04_zone01_sectorAlpha;

}

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: AToW "Advance" - Help Needed
« Reply #5 on: 13 Jul 2010, 21:13:44 »
Attached
« Last Edit: 13 Jul 2010, 21:57:43 by Mandoble »

Offline Spyder001

  • Members
  • *
Re: AToW "Advance" - Help Needed
« Reply #6 on: 14 Jul 2010, 04:31:42 »
Thanks Mando, I appreciate all the help! I am going to attach the mission that has everything mando created and I created put together. Here is what it does so far and what I am trying to get it to do. I think the what I need it to do part will require a re-write some my scripts lol.

There is a lot of stuff I need help with now. I will add the proper question tomorrow.
« Last Edit: 14 Jul 2010, 11:09:05 by Spyder001 »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: AToW "Advance" - Help Needed
« Reply #7 on: 14 Jul 2010, 22:15:22 »
Attached

Offline Spyder001

  • Members
  • *
Re: AToW "Advance" - Help Needed
« Reply #8 on: 15 Jul 2010, 01:05:19 »
Thanks again mando!

I'm going to attach my current state of my mission. I am trying to use the newCrate.sqf to move a game logic (which is where the frontline of your team is, advance.sqf). When I execute newCrate.sqf is moves the frontline to the position of the ammocrate. However, I had to define the game logic by name, not by using a variable so it works with the other game logics for different teams/zones. Here is what I thought it should when not defining the game logic by name, but no luck.

Code: [Select]
init.sqf

newCrate = w_bp_z01 addAction ["newCrate", "newCrate.sqf", _ammo];

Code: [Select]
newCrate.sqf

_this = _this select 0; // No idea, this seems redundant
_ammo = _this select 1; //ammo is actually the game logic i believe, used to be an ammo crate
_ammo setpos (getPos _this); //_ammo should point to the game logic, it's not!!
« Last Edit: 15 Jul 2010, 01:09:41 by Spyder001 »

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: AToW "Advance" - Help Needed
« Reply #9 on: 15 Jul 2010, 01:15:08 »
To refer to names for variables you may try

call compile format["my_global_var%1 = %2;", 1, 2];

which would be equivalent to execute
my_global_var1 = 2;

Not sure if this is what you were looking for.

Offline Spyder001

  • Members
  • *
Re: AToW "Advance" - Help Needed
« Reply #10 on: 15 Jul 2010, 01:45:20 »
No luck, I changed

_ammo = _this select 1;

to

call compile format["_ammo%1 = %2;", 1, 2]; and
_ammo = 2;

neither worked

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: AToW "Advance" - Help Needed
« Reply #11 on: 15 Jul 2010, 21:19:00 »
See attachment

Offline Spyder001

  • Members
  • *
Re: AToW "Advance" - Help Needed
« Reply #12 on: 16 Jul 2010, 08:13:41 »
Works great thanks mando.

Updated 1st page