b3d, schüsse (types)
Übersicht

RaoudiBetreff: b3d, schüsse (types) |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
könnte mir da wer plz schüsse reinproggen ._.?
ich kapier die types ned und denke das wär am besten wenns mir wer anhand meines codes zeigen/erklären würde Graphics3D 1024, 768, 32, 1 Const cam_col=0 Const smaili_col=1 Const terrain_col=2 Const dummy_col=3 SetBuffer BackBuffer() Global cam=CreateCamera() ;Sets the color of fog for this camera CameraFogColor cam,0,128,255 ;Sets the near/far range of fog for this camera CameraFogRange cam,1,500 CameraRange cam,0.1,500 ;Sets the fog mode for this camera. CameraFogMode cam,1 AmbientLight 30,30,30 xspeed#=0 yspeed#=0 zspeed#=0 djump%=1 wpnangle#=0 shotload = 5 ;;;;;;;;;;TYPES crosshair = LoadImage("cross.bmp") MaskImage crosshair,0,0,255 Global snd_pistol= LoadSound("pistol.wav") ;//skybox skybox = CreateCube() ScaleEntity skybox, 100,100,100 FlipMesh(skybox) ;smaili Global smaili=CreateSphere(10) PositionEntity smaili, 0, 0, 5 EntityType smaili,smaili_col Global dummy=CreateSphere(10) PositionEntity dummy, 10, 0, 20 EntityType dummy,dummy_col Global sm_txt=LoadTexture( "sm.bmp" ) Global earth_txt=LoadTexture( "earth.bmp" ) EntityTexture smaili, sm_txt Global dummy_txt=LoadTexture( "dummy.bmp" ) EntityTexture dummy, dummy_txt ;////pistol pistol=LoadMesh("glock1.3ds") glock_txt = LoadTexture("glock.bmp") EntityTexture pistol, glock_txt PositionEntity pistol,0,0,0 ScaleEntity pistol ,0.01,0.01,0.01 MoveMouse GraphicsWidth() / 2, GraphicsHeight() / 2 ;////hand hand=LoadMesh("hand.3ds") txt_hand = LoadTexture("hand.bmp") EntityTexture hand, txt_hand PositionEntity hand,0,0,0 ScaleEntity hand ,0.01,0.01,0.01 ;;;;;;;;;;TERRAIN Global terrain=LoadMesh("terrain.3ds") ;FlipMesh terrain ;ScaleEntity terrain,2,2,2 ;and centred (on x/z axis') at 0,0,0 PositionEntity terrain,0,10,0 ;push the centre vertex up half-way. EntityTexture terrain, earth_txt EntityType terrain,terrain_col ;;;;;;;;;;;effects fire2=LoadSprite( "bigspark.bmp" ) ScaleSprite fire2,0.6,0.6 firealpha# = 0 ;light Global light2=CreateLight(2) PositionEntity light2, 5, 2, 0 LightRange light2,20 fire=LoadSprite( "bigspark.bmp" ) PositionEntity fire, 5, 2, 0 ;light Global light1=CreateLight(2) PositionEntity light1, -10, 2, 0 LightRange light1,20 fire1=LoadSprite( "bigspark.bmp" ) PositionEntity fire1, -10, 2, 0 Collisions smaili_col,terrain_col,2,3 Collisions cam_col,terrain_col,3,3 Collisions smaili_col,dummy_col,2,3 ;///////////////MAINLOOOOOOOOOOOOOP\\\\\\\\\\\\\\\\\\\\\\\\\ While Not KeyHit(1) Include "controls.bb" xOff# = 0.4 zOff# = 0.6 EntityParent pistol,Cam PositionEntity pistol,xOff,-0.2,zoff xOff# = 0.4 zOff# = 0.6 EntityParent hand,Cam PositionEntity hand,xOff,-0.2,zoff ;;;;;;;;mousehit If MouseDown(1) If shotload >=3 If EntityPitch(cam)>-55 RotateEntity cam,EntityPitch(cam)-Rand(4,10),EntityYaw(cam)+Rand(-6,6),EntityRoll(cam) EndIf ;fire2=LoadSprite( "bigspark.bmp" ) shotload = 0 firealpha# = 1 PlaySound snd_pistol wpnangle# = 30 EndIf EndIf If shotload < 3 shotload = shotload+1 EndIf If firealpha# > 0 firealpha# = firealpha#-0.3 EndIf EntityAlpha fire2,firealpha# PositionEntity fire2, EntityX(cam), EntityY(cam), EntityZ(cam) RotateEntity fire2,EntityPitch(cam), EntityYaw(cam),EntityRoll(cam) MoveEntity fire2,.4, -0.2,1.4 ;///wpnangle# If wpnangle# > 0 wpnangle# = wpnangle#-5 RotateEntity pistol, -wpnangle#,0,0 RotateEntity hand, -wpnangle#,0,0 PositionEntity cam,x,y,z MoveEntity smaili,xspeed,yspeed,zspeed If yspeed# > -1 If Not EntityCollided(smaili,terrain_col) yspeed#=yspeed#-0.04 EndIf EndIf If KeyDown(42) mspeed# = 0.1 Else mspeed# = 0.25 EndIf If KeyDown(32) Then MoveEntity smaili, mspeed#, 0, 0 If KeyDown(30) Then MoveEntity smaili, -mspeed#, 0, 0 If KeyDown(17) Then MoveEntity smaili, 0, 0, mspeed# If KeyDown(31) Then MoveEntity smaili, 0, 0, -mspeed# If KeyHit(57) If EntityCollided(smaili,terrain_col) yspeed# = 0.6 EndIf If Not EntityCollided(smaili,terrain_col) If djump%>0 ;PlaySound snd_pistol yspeed# = yspeed#+0.5 djump%=0 EndIf EndIf EndIf If EntityCollided(smaili,terrain_col) Then djump% = 1 RotateEntity smaili,0,EntityYaw(cam),0 MoveMouse GraphicsWidth() / 2, GraphicsHeight() / 2 WireFrame(0) UpdateWorld RenderWorld ;;//drawing DrawImage crosshair,GraphicsWidth() / 2, GraphicsHeight() / 2 Flip Wend End |
||
![]() |
Xalon |
![]() Antworten mit Zitat ![]() |
---|---|---|
Probiers mal damit:
Zitat: Also CameraPick liefert alle objekt zurück, die an einer bestimmten BILDSCHIRMKOORDINATE gerade angezeigt werden bie einem Fadenkreuz wäre glaub ich die Mitte des Bildschirms am günstigsten.....
alle Ojekte, die gepickt werden KÖNNEN must mit EntityPickMode aktivieren. by Darren Xalon |
||
>>Besucht doch mal meine Seite,mit NEUEN Tutorials<<
User posted image |
Raoudi |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Xalon hat Folgendes geschrieben: Probiers mal damit:
Zitat: Also CameraPick liefert alle objekt zurück, die an einer bestimmten BILDSCHIRMKOORDINATE gerade angezeigt werden bie einem Fadenkreuz wäre glaub ich die Mitte des Bildschirms am günstigsten.....
alle Ojekte, die gepickt werden KÖNNEN must mit EntityPickMode aktivieren. by Darren Xalon dürfte gehen, aber ich wollte den kugeln ne gewisse geschwindigkeit geben, um später die zeit verlangsamen zu können. ausserdem komm ich um die types eh ned herum : / |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group