Destroyed enemy planes and damaged airfield

SS 2 Forum für Scripte und den Mapeditor.
Antworten
Benutzeravatar
HunButyok
Leutnant
Leutnant
Beiträge: 561
Registriert: 20.06.2006, 05:47
Wohnort: Zalacsány

Destroyed enemy planes and damaged airfield

Beitrag von HunButyok »

Hi guys!

I'm waiting for a script.

In my new PWM2 mission there is an idea.
When the japanese soldiers occupy an american airfield, they destroy the american planes. The destroyed planes create craters on the territory of the airfield.

Before your planes arrive this airfield you have to repair the aifield with your supply trucks.

I set the "Object is fully repaired" script, but doesn't work.

The script will be this:

Enemy planes destroyed and object is fully repaired --> send planes to player to the airfield 1.


I tested but my planes arrived before the repair of airfield will be finished... :oops:

Can someone help me?

Thank you very much!

The airfield is 1, the marker on the airfield (object, marker) 1 and the location where the enemy planes are the Locatiopn 1, the group of enemy planes is A2.
Bild
Benutzeravatar
Stahlin
Stabsunteroffizier
Stabsunteroffizier
Beiträge: 251
Registriert: 03.01.2009, 12:04

Re: Destroyed enemy planes and damaged airfield

Beitrag von Stahlin »

A simple solution: just add a delay to planes arrival?
Benutzeravatar
HunButyok
Leutnant
Leutnant
Beiträge: 561
Registriert: 20.06.2006, 05:47
Wohnort: Zalacsány

Re: Destroyed enemy planes and damaged airfield

Beitrag von HunButyok »

This is good idea, but if you destroy the enemy repair vehicles, you cannot repair the airfield.
And maybe someone forget to fix the airfield, his planes will crash...

But I think it will be the good idea... if i cannot find better solution...
Bild
Benutzeravatar
HunButyok
Leutnant
Leutnant
Beiträge: 561
Registriert: 20.06.2006, 05:47
Wohnort: Zalacsány

Re: Destroyed enemy planes and damaged airfield

Beitrag von HunButyok »

My biggest problem:

the marker on the airfield --> airfield not an object, for example the houses...
Bild
-gehtnix-
Oberst (Moderator)
Oberst (Moderator)
Beiträge: 1616
Registriert: 10.09.2007, 11:16

Re: Destroyed enemy planes and damaged airfield

Beitrag von -gehtnix- »

HunButyok hat geschrieben:My biggest problem:

the marker on the airfield --> airfield not an object, for example the houses...
Dann setzt man eben ein Gebäude, bei PWM2 wird dies doch aufgebaut, falls zerstört.
Flugfeld reparieren (wenn erforderlich), Gebäude aufbauen und Flieger anfordern durch betreten des Gebäudes (mit bestimmter Einheit oder Einheiten). So nebenbei, Einheit/en verloren -> keine Flieger ...

(Ein Kommandosoldat mit Leuchtrakete wäre eine Wahl, hätte man diesen ...)

Anhang PWM2
Dateianhänge
PWM2 Flugfeld1.zip
(19.51 KiB) 166-mal heruntergeladen
Benutzeravatar
Stahlin
Stabsunteroffizier
Stabsunteroffizier
Beiträge: 251
Registriert: 03.01.2009, 12:04

Re: Destroyed enemy planes and damaged airfield

Beitrag von Stahlin »

This is good idea, but if you destroy the enemy repair vehicles, you cannot repair the airfield.
And maybe someone forget to fix the airfield, his planes will crash...
Then it can be combined with a check if repair-group is in airfield location.

I suppose it will be executed only once then it is easier.

Create Location 19 on Airfield, H7 for repairtruck, J8 for enemy planes and in mission/player set delay (how long repair takes) to this type of plane (but then all of this type of planes come with the delay...) then it could be:

more than 0 units of group H7 in location 19 and less than 1 unit of group J8 in location 19

exclude this condition
send 2 planes of type fighter of player player into location 2 and land on airfield 1
(or similar)

This should work, except the repair truck is destroyed while repairing...
Benutzeravatar
HunButyok
Leutnant
Leutnant
Beiträge: 561
Registriert: 20.06.2006, 05:47
Wohnort: Zalacsány

Re: Destroyed enemy planes and damaged airfield

Beitrag von HunButyok »

Thank you very much guys the help. I think I will find the solution with your help.

I will continue the scripting in this map.
Bild
Antworten

Zurück zu „Sudden Strike 2 Mapeditor / Scripte“