This demonstrates the new map blink added today
Edited video removed please see further down
so today i fixed the missiles firing from the turrets now theyre too good but work as they are supposed too
function shootMissile(objectId as integer,initialSpeed as float, mass as float)
//To move dynamic physics bodies we need to apply velocity to the physics body.
gunPositionVec= CreateVector3(GetObjectWorldX(objectId),GetObjectWorldY(objectId),GetObjectWorldZ(objectId)) //im using the camera position as the gun position
//Create a tempory projectile block to calculate movement vectors of bullets
projectileDirBox as integer
projectileDirBox = CreateObjectBox( 1.0, 1.0, 1.0 )
//SetObjectPosition( projectileDirBox, GetVector3X( gunPositionVec ), GetVector3Y( gunPositionVec ), GetVector3Z( gunPositionVec ) )
//setobjectrotation(projectiledirbox,-55.0,GetObjectAngleY(objectId),270.0)
//setobjectrotation(projectiledirbox,GetObjectWorldAngleX(objectId),GetObjectWorldAngleY(objectId),GetObjectWorldAngleZ(objectId))
//SetObjectLookAt(projectiledirbox,GetObjectWorldX(objectID2),GetObjectWorldY(objectID2),GetObjectWorldZ(objectID2),0)
//if GetObjectWorldX(heliObj)< GetObjectWorldX(objectId) then MoveObjectLocalX( projectileDirBox, 1.15 )
//if GetObjectWorldX(heliObj)> GetObjectWorldX(objectId) then MoveObjectLocalX( projectileDirBox, -1.15 )
//MoveObjectLocalZ( projectileDirBox, 1.0 )
FixObjectToObject(projectileDirBox,ObjectId)
x#=GetObjectWorldX(projectileDirBox):y#=GetObjectWorldY(projectileDirBox):z#=GetObjectWorldZ(projectileDirBox)
FixObjectToObject(projectileDirBox,0)
SetObjectPosition(projectileDirBox,x#,y#,z#)
SetObjectLookAt(projectiledirbox,GetObjectWorldX(heliObj),GetObjectWorldY(heliObj),GetObjectWorldZ(heliObj),0)
MoveObjectLocalZ( projectileDirBox, 1.0 )
projectileDirVec = CreateVector3( GetobjectWorldX( projectileDirBox )-GetVector3X( gunPositionVec ), GetobjectWorldY( projectileDirBox )-GetVector3Y( gunPositionVec ), GetobjectWorldZ( projectileDirBox )-GetVector3Z( gunPositionVec ) )
//DeleteObject( projectileDirBox )
missile as integer
missile = CreateObjectSphere(.4,5,5)
//bullet = CreateObjectSphere(.45,.45,.45 )
//missile=InstanceObject(worldObj)
//SetObjectImage(missile,planetD,0)
SetObjectColor(missile, 255,0,0,255 )
SetObjectLightMode(missile,0)
SetObjectPosition(missile, GetVector3X( gunPositionVec ), GetVector3Y( gunPositionVec ), GetVector3Z( gunPositionVec ) )
SetObjectRotation(missile,GetObjectAngleX(projectileDirBox),GetObjectAngleY(projectileDirBox),GetObjectAngleZ(projectileDirBox)+180)
//RotateObjectLocalZ(missile,90)
DeleteObject( projectileDirBox )
//3D Physics code
Create3DPhysicsDynamicBody(missile)
//SetObjectShapeSphere( bullet )
SetObject3DPhysicsMass(missile, mass )
SetObject3DPhysicsLinearVelocity(missile, projectileDirVec, initialSpeed )
myItem as bullet
myItem.ID = missile //the object id of the bullet
myItem.time = timer() //timer is used to set there life time as bullets will die off after so long
planetMissile.insert(myItem) //update bullet arrow as there is unlimeted bullets
inc missileCount //used for a bullet counter to check if theyve timed out or not
deletevector3(projectileDirVec)
deletevector3(gunPositionVec)
endfunction missile
Added the new screens menu/help/credits created from 3d Models
Got the Atmosphere shader working better and closer to the desired colors
And optimised allot of code. I felt like I needed to do allot as blink has contributed so much lately
with all the models and now the map I couldn't have the break I wanted lol
Very happy how its coming along tho
fubar