collision -probelm
Übersicht

codieBetreff: collision -probelm |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
ich hab folgendes problem und zwar bekomm ich die fehlermeldung objekt not exist
in dieser zeile: Zitat: If EntityCollided(a\patrone,2)Then ShowEntity a\patrone EndIf der kontext Zitat: Graphics3D 1024,786,16,2 SetBuffer BackBuffer() AntiAlias = True pat=CreateSphere() HidePointer Text 1,1,"FPS: "+fps Global hebel Global z Global piv=1,level=2,b=3 ;Hier lege ich den Collisionsvariablennamen fest arauf achten das er GLOBAL ist! Type schiessen Field patrone End Type piv=CreatePivot() cam=CreateCamera() PositionEntity cam ,0.2,25,0 MoveEntity cam ,0,1,-0.1 EntityX(cam) cub =LoadMesh ("C:\Dokumente und Einstellungen\Philipp\Desktop\u3.3ds") TurnEntity cub ,0,179.99,0 PositionEntity cub,15,16,10 Global a.schiessen EntityFX cub ,16 licht=CreateLight() PositionEntity licht ,0,0,1 LightRange licht,100 enemy=CreateCube() PositionEntity enemy ,0.3,-150,0 EntityColor enemy ,255,0,0 ScaleEntity enemy ,10,3,10 world=CreateCube() PositionEntity world ,0,-200,0 ScaleEntity world ,100,0.01,100 EntityParent cam,piv EntityParent cub,piv EntityType piv ,1 EntityType world ,level EntityType enemy ,4 EntityRadius piv ,0.5,20 Collisions 1,2,2,3 Collisions 3,2,2,1 Collisions 1,4,2,3 Collisions 3,4,2,1 steuerung=0 While Not KeyHit(1) TranslateEntity piv ,0,-10,0 If MouseHit(2) If zoom=0 zoom=1 MoveEntity cub ,11.1,2,0 MoveEntity cam ,0,0,15 Else If zoom=1 zoom=0 MoveEntity cub ,-11.1,-2,0 MoveEntity cam ,0,0,-15 EndIf EndIf If MouseHit(3) Then If steuerung=1 Then steuerung=0 Else steuerung=1 EndIf EndIf If steuerung=0 If KeyDown(31) Then MoveEntity piv ,0,0,-2 If KeyDown(17) Then MoveEntity piv ,0,0,2 If KeyDown(32) Then MoveEntity piv ,1,0,0 If KeyDown(30) Then MoveEntity piv ,-1,0,0 RotateEntity piv,EntityPitch(piv)+MouseYSpeed(),EntityYaw(piv)-MouseXSpeed(),0 MoveMouse 320,230 Else If KeyDown(31) Then MoveEntity piv ,0,0,-1 If KeyDown(17) Then MoveEntity piv ,0,0,1 If KeyDown(32) Then MoveEntity piv ,1,0,0 If KeyDown(30) Then MoveEntity piv ,-1,0,0 RotateEntity piv,EntityPitch(piv)+MouseYSpeed() /2.4,EntityYaw(piv)-MouseXSpeed()/2.4 ,0 MoveMouse 320,230 EndIf If MouseDown (1) Then a.schiessen = New schiessen; a\patrone = CopyEntity (pat) ScaleEntity a\patrone ,0.5,0.5,0.5 RotateEntity a\patrone ,EntityPitch(piv),EntityYaw(piv),EntityRoll(piv) PositionEntity a\patrone ,EntityX(piv) ,EntityY(piv)+26,EntityZ(piv) EntityType a\patrone , b EntityRadius a\patrone ,1 EndIf If EntityCollided(a\patrone,2)Then ShowEntity a\patrone EndIf For a.schiessen = Each schiessen MoveEntity a\patrone ,0,0,50 Next RenderWorld frames=frames+1 If MilliSecs()-render_time=>1000 Then fps=frames frames=0 render_time=MilliSecs() EndIf Text 1,1,"FPS: "+fps shoter = LoadImage ("C:\Dokumente und Einstellungen\Philipp\Desktop\neuer ordner\fk.bmp") MaskImage shoter ,255,255,255 ScaleImage shoter ,0.2,0.2 DrawImage shoter,((GraphicsWidth()/2)-9),((GraphicsHeight()/2)-15) Text 200,20, EntityX (piv) +""+EntityY(piv)+""+EntityZ(piv) UpdateWorld Flip Wend End also ichhab in der Whlieschleife das der entitytyp der patrone b ist dann hab ich als globale b=3 unter collisions 3,2,2,3 dann hab ich entitytype world ,level und als globale level=2 hat wer ne idee oder lösung? danke im vorraus |
||
Wer bist zum Hals in der Scheiße steckt sollte den Kopf nicht hängen lassen. |
![]() |
Silver_Knee |
![]() Antworten mit Zitat ![]() |
---|---|---|
ich hab den code mir jetz nich durchgelesenaber wenn die patrone mit showentity angezeigt werden soll ist sie bestimmt vorher mit hideentity versteckt orden und da hideentity die kollisionen außer kraft setzt.... | ||
codie |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
habs weggemacht allerdings kommt der selbe fehler ![]() |
||
Wer bist zum Hals in der Scheiße steckt sollte den Kopf nicht hängen lassen. |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group