Warum funzt das nicht?
Übersicht

![]() |
GoldiniBetreff: Warum funzt das nicht? |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hi,
Kann mir jemand erklären warum ich keinen Sprite sehe wenn der Schuss mit der Senerie Kollidiert? Code: [AUSKLAPPEN] Const SCENE=2,SHOOTS=6 Collisions SHOOTS,SCENE,2,1 deckbp2=LoadMesh("gfx/bridge.b3d") PositionEntity deckbp2,0,0,0 ScaleEntity deckbp2,.5,.5,.5 ;ScaleEntity deckbp2,3.5,3.5,3.5 EntityType deckbp2,SCENE EntityPickMode deckbp2,2,1 Function shooting(obj,obj2,x#,y#,z#) s.shoot=New shoot s\spark=LoadSprite("gfx/spark.bmp",2) s\light=CreateLight(2,s\spark) LightRange s\light,10 PositionEntity s\spark,EntityX(obj),EntityY(obj)+y#,EntityZ(obj) RotateEntity s\spark,EntityPitch(obj2),EntityYaw(obj),EntityRoll(obj2) MoveEntity s\spark,x#,0,z# PointEntity s\spark,cross EntityFX s\spark,1 ScaleSprite s\spark,3,3 EntityRadius s\spark,.5 EntityType s\spark,SHOOTS End Function Function UpdateShoot() For s.shoot=Each shoot If EntityCollided(s\spark,SCENE) For k=1 To CountCollisions( s\spark ) If GetEntityType( CollisionEntity( s\spark,k ) )=SCENE cx#=CollisionX( s\spark,k ) cy#=CollisionY( s\spark,k ) cz#=CollisionZ( s\spark,k ) nx#=CollisionNX( s\spark,k ) ny#=CollisionNY( s\spark,k ) nz#=CollisionNZ( s\spark,k ) h.HotDots=New HotDots h\hole=LoadSprite("gfx/point.png",2) EntityBlend h\hole,2 SpriteViewMode h\hole,2 PositionEntity h\hole,cX#,cY#,cZ# AlignToVector h\hole,nx,ny,nz,3 MoveEntity h\hole,0,0,1 ;EntityColor h\hole,r,g,b h\alpha#=1 Exit EndIf Next End If Danke im vorraus MFG Goldini |
||
Mit diesen Zeilen danke ich einer Person, die mich für so wichtig hält, dass sie sogar einen Club nach mir benannt hat!
Danke! ![]() |
![]() |
Silver_Knee |
![]() Antworten mit Zitat ![]() |
---|---|---|
aber ich hab so meinen schlechten erfahrungen mit der vermischung von Entitycollided und den countCollisions konstruckten ich bin da ganz klar Xor: und da EntityCollided für so ne positionierung nicht genug infos hergibt muss da countcollisions herhalten. also meiner meinun gnach einfach Entitycollieded rauswerfen und es dürfte klappen. | ||
![]() |
Goldini |
![]() Antworten mit Zitat ![]() |
---|---|---|
Klapt leider noch nicht... ![]() Mfg |
||
Mit diesen Zeilen danke ich einer Person, die mich für so wichtig hält, dass sie sogar einen Club nach mir benannt hat!
Danke! ![]() |
Dreamora |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Bitte den korrigierten code posten. | ||
Ihr findet die aktuellen Projekte unter Gayasoft und könnt mich unter @gayasoft auf Twitter erreichen. |
![]() |
Goldini |
![]() Antworten mit Zitat ![]() |
---|---|---|
Klar sry
Code: [AUSKLAPPEN] Const SCENE=2,SHOOTS=6 Collisions SHOOTS,SCENE,2,1 deckbp2=LoadMesh("gfx/bridge.b3d") PositionEntity deckbp2,0,0,0 ScaleEntity deckbp2,.5,.5,.5 ;ScaleEntity deckbp2,3.5,3.5,3.5 EntityType deckbp2,SCENE EntityPickMode deckbp2,2,1 Function shooting(obj,obj2,x#,y#,z#) s.shoot=New shoot s\spark=LoadSprite("gfx/spark.bmp",2) s\light=CreateLight(2,s\spark) LightRange s\light,10 PositionEntity s\spark,EntityX(obj),EntityY(obj)+y#,EntityZ(obj) RotateEntity s\spark,EntityPitch(obj2),EntityYaw(obj),EntityRoll(obj2) MoveEntity s\spark,x#,0,z# PointEntity s\spark,cross EntityFX s\spark,1 ScaleSprite s\spark,3,3 EntityRadius s\spark,.5 EntityType s\spark,SHOOTS End Function Function UpdateShoot() For s.shoot=Each shoot For k=1 To CountCollisions( s\spark ) If GetEntityType( CollisionEntity( s\spark,k ) )=SCENE cx#=CollisionX( s\spark,k ) cy#=CollisionY( s\spark,k ) cz#=CollisionZ( s\spark,k ) nx#=CollisionNX( s\spark,k ) ny#=CollisionNY( s\spark,k ) nz#=CollisionNZ( s\spark,k ) h.HotDots=New HotDots h\hole=LoadSprite("gfx/point.png",2) ;EntityBlend h\hole,2 SpriteViewMode h\hole,2 PositionEntity h\hole,cX#,cY#,cZ# ;ScaleSprite h\ll,5,5 AlignToVector h\hole,nx,ny,nz,3 MoveEntity h\hole,0,0,1 ;EntityOrder h\ll,-10 ;EntityColor h\hole,r,g,b h\alpha#=1 Exit EndIf Next MoveEntity s\spark,0,0,10 If EntityDistance(s\spark,campiv)>200 Or EntityCollided(s\spark,Scene) Then FreeEntity s\spark : Delete s Next End Function Mfg |
||
Mit diesen Zeilen danke ich einer Person, die mich für so wichtig hält, dass sie sogar einen Club nach mir benannt hat!
Danke! ![]() |
![]() |
Silver_Knee |
![]() Antworten mit Zitat ![]() |
---|---|---|
hmm ich erinner mich an einen satz der englischen original hilfe. Da stand was in der richtung, dass nur Box kollision bei sprites läuft.... ich kuk mal... mom
hmm ich finds net... |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group