Type Confusion

Blitz3D Forums/Blitz3D Programming/Type Confusion

fireshadow4126(Posted 2009) [#1]
What am I doing wrong?


The ...s represent code that is irrelevant
the problem is, the bullet isn't moving, the model is just sitting there up in the sky.
What do I do?


Yasha(Posted 2009) [#2]
Your "Speed" field is a integer. When you set it to 0.4 it's being rounded down to zero. You have to specify in the Type declaration that it should be a float:

Type Bullet
    Field Model
    Field Damage
    Field Speed#
End Type


You might want to do this for Damage as well, depending on what you want to do. It's also worth pointing out that you can load a mesh straight into a Type field.


fireshadow4126(Posted 2009) [#3]
thnx Yasha.
Didn't think of that