Ich hab erst neulich das TuT entdeckt ( https://autoit.de/index.php?page…p;pageNo=1& ) und wollte mich mal ran testen.
Aber schon recht am Anfang hab ich schon schwierigkeiten undzwar beim versuch einer Map zu öffnen.
Zum Testen nahm ich eine .bsp Datei aus meinem CounterStrike Ordner. Beim starten seh ich nur einen Weissen Bildschirm und nach beenden steht in der Console:
Could not load .bsp file, unknown header.: C:/Users/.../mapname.bsp
Could not load mesh, file format seems to be unsupported: mapname.bsp
Hab auch versucht eine neue Map zu erstellen mit dem HammerEditor, der selbe Fehler.
Beispiel aus einem Example (1:1)
Spoiler anzeigen
; ----------------------------------------------------------------------------
; Irrlicht Wrapper for Imperative Languages - Freebasic Examples
; Frank Dodd (2006)
; Converted/modified for the au3Irr2 project by linus
; ----------------------------------------------------------------------------
; Example 05: BSP Map
; This example loads a BSP map from a pk3 archive and creates a first person
; perspective camera so you can move around and view the map with the mouse and
; the arrow keys
; ----------------------------------------------------------------------------
; ////////////////////////////////////////////////////////////////////////////
; Includes for extension libraries
#include <au3Irrlicht2.au3>
opt("MustDeclareVars", True)
HotKeySet("{ESC}", "_exit")
Func _exit()
_IrrStop()
Exit
EndFunc ; _exit
; ////////////////////////////////////////////////////////////////////////////
; global variables
; irrlicht objects
DIM $BSPMesh ; irr_mesh
DIM $BSPNode ; irr_node
DIM $Camera ; irr_camera
DIM $CameraNode ; irr_node
; ////////////////////////////////////////////////////////////////////////////
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]; -----------------------------------------------------------------------------
; start the irrlicht interface
_IrrStart( $IRR_EDT_OPENGL, 800, 600, $IRR_BITS_PER_PIXEL_32, _
$IRR_WINDOWED, $IRR_NO_SHADOWS, $IRR_IGNORE_EVENTS, $IRR_VERTICAL_SYNC_ON )
; send the window caption
_IrrSetWindowCaption( "Example 05: BSP Map" )
; first we add the pk3 archive to our filing system. once we have done this
; we can open any of the files in the archive ; if they were in the current
; working directory
_IrrAddZipFile( "map-20kdm2.pk3", $IRR_IGNORE_CASE, $IRR_IGNORE_PATHS )
; load the BSP map from the archive ; a mesh object. any polygons in the mesh
; that do not have textures will be removed from the scene!
$BSPMesh = _IrrGetMesh( "20kdm2.bsp" )
; add the map to the scene ; a node. when adding the mesh this call uses a
; mechanism called an octtree that if very efficient at rendering large amounts
; of complext geometry most of which cant be seen, using this call for maps
; will greatly improve your framerates
$BSPNode = _IrrAddMeshToSceneAsOcttree( $BSPMesh )
; add a first person perspective camera into the scene that is controlled with
; the mouse and the cursor keys. if however you capture events when starting
; irrlicht this will become a normal camera that can only be moved by code
$Camera = _IrrAddFPSCamera()
; when we add a camera we are returned a camera object however we can perform
; node operations on many different object types that are entities within the
; scene however first we need to convert the camera type into a node type
$CameraNode = $Camera
; reposition and rotate the camera to look at a nice part of the map
_IrrSetNodePosition( $CameraNode, 1750, 149, 1369 )
_IrrSetNodeRotation( $CameraNode, 4, -461.63, 0 )
; hide the mouse pointer
_IrrHideMouse()
; -----------------------------------------------------------------------------
; while the irrlicht environment is still running
WHILE _IrrRunning()
; begin the scene, erasing the canvas with sky-blue before rendering
_IrrBeginScene( 240, 255, 255 )
; draw the scene
_IrrDrawScene()
; end drawing the scene and display it
_IrrEndScene()
WEND
; -----------------------------------------------------------------------------
; Stop the irrlicht engine and release resources
_IrrStop()
Für meinen Teil änderte ich nur dies:
;_IrrAddZipFile( "map-20kdm2.pk3", $IRR_IGNORE_CASE, $IRR_IGNORE_PATHS ) //brauch ich nicht, da die Map nicht gepackt ist
$BSPMesh = _IrrGetMesh( "mapname.bsp" )
Rest gleich.
Beim öffnen der .pk3 Datei mit WinRar sah ich, dass dort mehr als nur die .bsp Datei vorhanden ist. Warscheinlich liegt der Fehler daran.
Nur bekomm ich mit dem HammerEditor nicht diese Dateien, bzw. weiß ich nicht wie.
Vielleicht könnt ihr mir ja hierzu helfen.
MfG