HX3 Foren

HX3 Foren (https://hx3.de/)
-   Editing & Scripting (https://hx3.de/editing-scripting-167/)
-   -   Script-Höhe Objekt verändern (https://hx3.de/editing-scripting-167/script-hoehe-objekt-veraendern-20664/)

Deep Five-9te 11.05.2011 09:57

Script-Höhe Objekt verändern
 
Ich nutze ein Script von [KH]BabyAlien "napalm.sqs".
Ausgelöst über Funk oder Auslöser,je nach Verwendungszweck.
Ich habe schon zu Testzwecken die "Bo_FAB_250" geändert in "MineE" oder "M67".
Alle Objekte "spawnen" am Boden und detonieren dort,
bzw. die Mienen bleiben am Boden liegen (_theObject setdammage 1) weg gelassen.
Nun,meine Kenntnisse des scriptens reichen bei weitem nicht aus,
würde ich gerne das Objekt in diesem Script in einer bestimmten Höhe "Spawnen" lassen.
Zum Beispiel die HuntIR-Granate oder ein Starshell bei 500 oder 1000 Meter über dem Boden.

Wenn das mit diesem Script möglich währe in Form von
geänderten oder hinzu gefügten Zeilen/Zeile,währe ich dafür dankbar.
Hier das Script:
Code:

; ****************************************************************
; Script file for Armed Assault
; Created by: [KH]BabyAlien
; ****************************************************************
 
; Example script call --> [theCar, howmany] exec "napalm.sqs"
; using too many howmanys (eg 500) might cause lag :D
;start script
_theObject = _this select 0
_howmany = _this select 1
;locate the first helepad to start bombing
_bombLoc =  GetPos _theObject
_bombLocX = _bombLoc select 0
_bombLocY = _bombLoc select 1
_bombLocZ = _bombLoc select 2
;locate the end position to start bombing
_bombfinish = GetPos bombend
_bombfinishX = _bombfinish select 0
_bombfinishY = _bombfinish select 1
_bombfinishZ = _bombfinish select 2
;find out the distances on both X & Y coordinates between start and finish
_shiftx = _bombfinishX - _bombLocX
_shifty = _bombfinishY - _bombLocY
;find out the distance in gap between each bomb dropping
_shiftx = _shiftx / _howmany
_shifty = _shifty / _howmany
;Creating the bombs, detonating them and moving along each gap counting down until
;less than 1 bomb remains (which should be 0) and then it exits (stops the bombing run)
#AGAIN
 "Bo_FAB_250" createVehicle[_bombLocX, _bombLocY, _bombLocZ]
_theObject setdammage 1
_howmany = _howmany - 1
?(_howmany < 1): exit
~0.15
_bombLocX = _bombLocx + _shiftx
_bombLocY = _bombLocY + _shiftY
goto "AGAIN"

Besten Dank im Voraus

Michael

Vienna 11.05.2011 14:01

Hier ein anderes Skript mit einer Beispielmission:

http://hx3.de/editing-scripting-167/...32/#post359462


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:49 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