HX3 Foren

HX3 Foren (https://hx3.de/)
-   Editing (https://hx3.de/editing-139/)
-   -   Frage zum Airstrikescript von Mr Murray (https://hx3.de/editing-139/frage-airstrikescript-mr-murray-13943/)

Heck Schaden 16.12.2006 19:18

Frage zum Airstrikescript von Mr Murray
 
HAllo, ich bin ein absoluter Neuling im Scibten. Meine Frage ist, ich hoffe sie ist nicht zu doof, wie kann ich jetzt den oben genannten scribt so umbauen, dass nicht eins sondern zwei oder drei Flugzeuge kommen?

Für Hilfe wöre ich dankbar!

pspsps91 17.12.2006 14:26

vielleicht wäre es hilfreich, wenn du das Script hier reinposten könntest...

leo235 17.12.2006 14:41

das kann ich ja mal machen:







;Skript & Idea by Mr-Murray 2006
;mr-murray@bossmail.de
;www.mapfact.net
;www.mr-murray.de.vu

?sperre : goto "Ende2"
sperre=true

setfire=true
titletext ["Click on the map to set your firedirection","plain down"]
onMapSingleClick "ASTarget setpos _pos;setfire=false"

@!setfire
"Firedirection" setmarkerpos getpos ASTarget
onMapSingleClick ""
titletext ["","plain down"]
Playsound "Funk"

;=========DEFINE=======================
_dropPosition = getpos ASTarget
~0.5
_dropPosX = _dropPosition select 0
_dropPosY = _dropPosition select 1
_dropPosZ = _dropPosition select 2
~0.1
_planespawnpos = [_dropPosX - 3000, _dropPosY, _dropPosZ + 1000]
_pilotspawnpos = [_dropPosX - 3000, _dropPosY, _dropPosZ + 1000]

;=========CREATE=======================
~0.1
_plane = "AV8B" createvehicle _planespawnpos
_plane setpos [(getpos _plane select 0),(getpos _plane select 1),900]
_pilot = "SoldierWPilot" createUnit [getmarkerpos "Firedirection", dummy,"pilot1=this"]
_Plane setVelocity [50,0,0]

~0.4
pilot1 MoveInDriver _plane
pilot1 setdamage 0

pilot1 action ["gear_up", vehicle pilot1]

_plane FlyInHeight 100
_plane SetSpeedMode "full"

#Check
pilot1 doMove getpos ASTarget
pilot1 dotarget ASTarget
pilot1 dowatch ASTarget
? (_plane distance ASTarget) < 1500 : goto "Drop"
goto "Check"

#Drop
~5.2
_plane FlyInHeight 90
_plane setpos [(getpos _plane select 0),(getpos _plane select 1),100]
~1.05
_plane fire "BombLauncher"
~0.1
_plane fire "BombLauncher"
~0.6
_plane fire "BombLauncher"
~0.1
_plane fire "BombLauncher"
~0.6
_plane fire "BombLauncher"
~0.1
_plane fire "BombLauncher"
_plane SetSpeedMode "normal"
~3
_plane FlyInHeight 600

pilot1 doMove getpos Dummy
pilot1 dotarget Dummy


#Check2
_plane Setdamage 0
pilot1 Setdamage 0
pilot1 MoveInDriver _plane
? (_plane distance ASTarget) > 2500 : goto "Ende"
goto "Check2"


#Ende
ASTarget setpos getpos Dummy
"Firedirection" setmarkerpos getpos Dummy
deletevehicle _plane
deletevehicle pilot1

sperre=false
exit


#Ende2
hintc "An airstrike is currently not available! Wait!"

exit

Kissaki 20.03.2008 01:17

Ich hab jetzt mit dem Script das lustige Problem das mein Flugzeug erstellt wird (das das klappt hab ich auch erst durch nen Marker rausgefunden welchen ich auf das Flugzeug gepappt hab) dieses sich allerdings schnurstracks in Richtung Boden bewegt und dadurch komplett zerlegt wird... ich hab echt kA woran das liegt, könnt ihr mir das vllt. sagen?

Hier ist der Code (den ich,b is auf die Marker, von dem Thema hier hab):

Zitat:

~0.1
_PlaneG = creategroup WEST;
_plane = "AV8B" createvehicle _planespawnpos
_plane setpos [(getpos _plane select 0),(getpos _plane select 1),1000]
_pilot = "SoldierWPilot" createUnit [GetMarkerPos "Firedirection", _PlaneG, "P1=this"]
_Plane setVelocity [50,0,0]
~0.1

P1 MoveInDriver _plane
P1 setdamage 0
P1 action ["gear_up", vehicle P1]
_plane FlyInHeight 100
_plane SetSpeedMode "full"
#Check
P1 doMove getpos ASTarget
P1 dotarget ASTarget
P1 dowatch ASTarget
"PilotP" setMarkerPos getpos P1
;"PlaneP" setMarkerPos getpos _plane
? (_plane distance ASTarget) < 1500 : goto "Drop"
goto "Check"
#Drop
[west,"HQ"] sidechat "Drop"
~5.2
_plane FlyInHeight 90
_plane setpos [(getpos _plane select 0),(getpos _plane select 1),100]
~1.05
_plane fire "BombLauncher"
~0.1
_plane fire "BombLauncher"
~0.6
_plane fire "BombLauncher"
~0.1
_plane fire "BombLauncher"
~0.6
_plane fire "BombLauncher"
~0.1
_plane fire "BombLauncher"
_plane SetSpeedMode "normal"
~3
_plane FlyInHeight 600
p1 doMove getpos Dummy
p1 dotarget Dummy

#Check2
"PilotP" setMarkerPos getpos P1
_plane Setdamage 0
P1 Setdamage 0
P1 MoveInDriver _plane
? (_plane distance ASTarget) > 2500 : goto "Ende"
goto "Check2"

#Ende
ASTarget setpos getpos Dummy
"Firedirection" setmarkerpos getpos Dummy
deletevehicle _plane
deletevehicle P1
sperre=false
exit

#Ende2
hintc "An airstrike is currently not available! Wait!"
exit

Legislator 20.03.2008 11:34

Das Problem hab ich seit den Anfangstagen der 1.08 auch. Ich tippe mal auf irgendeine komische Änderung in ArmA selbst, die das auslöst. Einfach mal abwarten was der neue Patch bringen wird. Als Alternative kannst du ja unsichtbare Laserziele aus dem Mapfact Misc und ein paar GBU Bomber vorplatzieren. Dann gibst du ihnen einen Wegpunkt und setzt bei der Bedingung eine Variable z.B. go Wenn der Luftangriff beginnen soll, setzt du die Variable auf true (go=true in einem Auslöser). Schon fliegen sie weiter, machen einen Überflug und die Bomben landen zielgenau (auch in der 1.08) am Lasermarker. Das funktioniert mit GBU Harrier, der Mapfact A-10 GBU und auch mit der der Avro Vulcan.

IntoTheLight 20.03.2008 12:34

okay
heck schaden - pass auf...ich meine ich hab zwar nix gegen murrays script
mag ja ganz nett sein. aber ich schlage vor du nimmst am besten das mandobomb script
http://www.ofpec.com/ed_depot/the_fi...oad.php?id=524
da brauchst du nichts selber eintippen. das script basiert komplett auf sqf (funktions script)
das einzige was du machen könntest aber nicht musst : ist in der init datei den flugzeugtyp zu ändern oder die anzahl der strikes zu erhöhen. mit dem script hast du ausserdem die möglichkeit zwischen freefall bomb und sadarm zu wechseln. das ist meinermeinung nach eines der besten scripte für missionsbastler. na mandoble is ja auch n profi schon seit ofp damals.

Mr-Murray 21.03.2008 10:12

Servus
Das Problem daran ist, dass dies Skript schon vor dem ArmA-Release geschrieben wurde
und ich leider noch nicht die Zeit hatte nochmal drüber zu schauen. Fürs neue Editing
Guide habe ich noch einiges daran verbessert. Grundsätzlich bleibt es aber gleich.

Ich habe es kürzlich auch "in etwas" verbaut und es arbeitet perfekt! You´ll see!

Für MP allerding ist es nicht die perfekte Lösung. Es gibt eben viel zu viel Dinge zu
berücksichtigen. Höhe, Geschwindigkeit, Berge uvm.

Ich würde jetzt auch erstmal auf Mandoble verweisen, obwohl ich die Funktion nicht kenne.
Schaue ich mir bei Zeiten mal an. Wenn mein Buch gedruckt ist, dann ist Zeit für sowas.

Die Druckdatei liegt im Übrigen hier. Morphicon kann sich nicht für ein Cover entscheiden *grrrr*


Beste Grüße

Mr-Murray

Stolze 21.03.2008 10:56

@murray man könnte es doch mp tauglich machen wenn man das flugzeug weg lässt und nur die bomben einschlagen lässt so wie dominiation day oder ?? ich kenn mich da nicht besonders aus :-) oder wenn man es in 900 meter höhe fliegen lässt

Mr-Murray 21.03.2008 18:44

Nabend
Klar, generell kann man überall einfach irgendwas erzeugen. Bei obigen Beispiel sollte es
aber einigermaßen komplett sein. Also auch real mit Anflug etc. Das war eben der
Grundgedanke! Einfach etwas zu erzeugen ist minutensache und weit weniger beeindruckend.


Grüße
Mr-Murray

Virility92 29.12.2008 13:39

hi, ich wollte dein script aus der airstrike-beispiel mission verändern, so das anstatt nem harrier ein avro lancaster aus dem 31st normandy mod fliegt. aber irgendwie wird kein flugzeug gespawned. dabei habe ich nur den namen geändert(rot markiert):

Code:

;Skript & Idea by Mr-Murray 2006
;mr-murray@bossmail.de
;www.mapfact.net
;www.mr-murray.de.vu

?sperre : goto "Ende2"
sperre=true

setfire=true
titletext ["Click on the map to set your firedirection","plain down"]
onMapSingleClick "ASTarget setpos _pos;setfire=false"

@!setfire
"Firedirection" setmarkerpos getpos ASTarget
onMapSingleClick ""
titletext ["","plain down"]
Playsound "Funk"

;=========DEFINE=======================
_dropPosition  = getpos ASTarget
~0.5
_dropPosX = _dropPosition select 0
_dropPosY = _dropPosition select 1
_dropPosZ = _dropPosition select 2
~0.1
_planespawnpos = [_dropPosX - 3000, _dropPosY, _dropPosZ + 1000]
_pilotspawnpos = [_dropPosX - 3000, _dropPosY, _dropPosZ + 1000]

;=========CREATE=======================
~0.1
_PlaneG = creategroup WEST;
_plane = createVehicle  ["lancaster",_planespawnpos,[], 0, "FLY"];
_plane setpos [(getpos _plane select 0),(getpos _plane select 1),900]
_pilot = "SoldierWPilot" createUnit [getmarkerpos "Firedirection", _PlaneG,"pilot1=this"]
_Plane setVelocity [100,0,0]

~0.4
pilot1 MoveInDriver _plane
pilot1 setdamage 0

pilot1 action ["gear_up", vehicle pilot1]
Pilot1 disableAI "Autotarget"

_plane FlyInHeight 120
_plane SetSpeedMode "limited"
Pilot1 SetSpeedMode "limited"

#Check
pilot1 doMove getpos ASTarget
pilot1 dotarget ASTarget
pilot1 dowatch ASTarget
? (_plane distance ASTarget) < 2000 : goto "Drop"
goto "Check"

#Drop
_i=0
_plane setpos [(getpos _plane select 0),(getpos _plane select 1),100]
_plane FlyInHeight 80
~13

#FIRE
_i=_i+1
_plane fire "BombLauncher";
~0.2
? _i <= 6 : goto "FIRE"

;=========FLY AWAY=======================

#AWAY
ASTarget setpos [0,0,0]
"Firedirection" setmarkerpos [0,0]
_plane SetSpeedMode "Full"
~4
_plane FlyInHeight 300
Pilot1 enableAI "Autotarget"
P1 doMove getpos ASTarget;


#Check2
_plane Setdamage 0
pilot1 Setdamage 0
pilot1 MoveInDriver _plane
? (_plane distance Player) > 2500 : goto "Ende"
goto "Check2"

#Ende
deletevehicle _plane
deletevehicle pilot1
deleteGroup _PlaneG

sperre=false
exit


#Ende2
hintc "An airstrike is currently not available! Wait!"

exit

also die bezeichnung des flugzeugs stimmt aufjedenfall. an was kann das liegen??? kann es vielleicht sein, dass das flugzeug am rand der map gespawned wird und dann zum ziel fliegt? wenn ja dann braucht es ja ewig bis es auf der riesigen normandy map am ziel ankommt^^

Mr-Murray 29.12.2008 15:58

Nabend
Ist der Klassenname auch richtig?

Kannst du dir hiermit ausgeben lassen:
hint format ["typeOf NameDeinesObjektes",%1]

Ansonsten musst du natürlich auch schauen, dass die Waffenbezeichnung passt. Beim Harrier ist es BomLauncher.

Cheers,
Mr-Murray

Virility92 29.12.2008 18:14

also der klassenname ist richtig, naja an der waffenbezeichnung kann es ja eigentlich nicht liegen weil sonst würde wenigstens das flugzeug gespawned werden oder?^^

//edit: wow es lag doch an der waffenbezeichnung^^ aber jetzt hab ich noch ne frage: was muss ich ändern damit mehrere flieger fliegen?

//edit2: hmm komisch jetzt funktionierts auf einmal nicht mehr, obwohl ich nichts geändert hab^^


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:02 Uhr.

Angetrieben durch vBulletin, Entwicklung von Philipp Dörner & Tobias


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119