Is it me or does this not work???
I am trying to place a pivot at the maximum range point for my bullets.
The bullets are maintained within Types. I originally tried NewBullet\Piv_End=CreatePivot()
but realised Blitz thinks it should just be a variable, not a handle and it's quite wasteful (considering how many bullets may be fired!) So I changed to CopyEntity (The Original Pivot_End_Template is created earlier on.
However, I keep getting an Entity Doesn't Error with the MoveEntity line regarding the pivot.
NewBullet.Bullet = New Bullet
NewBullet\Range=Gunrange
NewBullet\Speed=GunSpeed
NewBullet\Damage=Gundamage
NewBullet\Anim=0
NewBullet\sprite=CopyEntity (bullet_sprite)
EntityAlpha NewBullet\Sprite,1
EntityType NewBullet\Sprite,3
PositionEntity NewBullet\Sprite,EntityX#(cockpitcam,1),EntityY#(cockpitcam,1),EntityZ#(cockpitcam,1)
RotateEntity NewBullet\Sprite,EntityPitch(ship,1),EntityYaw(ship,1),EntityRoll(ship,1)
EntityRadius NewBullet\Sprite,3,3
EntityPickMode NewBullet\Sprite,1
NewBullet\Piv_End=CopyEntity(pivot_end_template)
PositionEntity NewBullet\Piv_End,EntityX#(cockpitcam,1),EntityY#(cockpitcam,1),EntityZ#(cockpitcam,1)
RotateEntity NewBullet\Piv_End,EntityPitch(ship,1),EntityYaw(ship,1),EntityRoll(ship,1)
MoveEntity Piv_End,0,0,NewBullet\Range
|