I'm not sure what youre doing so i can't suit it for your needs but i can give an example:
Code:Private Type pos2d x As Integer y As Integer End Type Private Pguypos As pos2d Dim Velocity As pos2d Private Property Get guypos() As pos2d guypos = Pguypos End Property Private Property Let guypos(newval As pos2d) If Not map(newval.x, newval.y).Collidable Then Pguypos = newval End If End Property Sub moveguy() guypos = posadd(guypos, Velocity) End Sub Private Function posadd(arg1 As pos2d, arg2 As pos2d) As pos2d posadd.x = arg1.x + arg2.x posadd.y = arg1.y + arg2.y End Function





Reply With Quote