I found this radar code and was wondering if it could be added to the 1.19 source code with out problems or if it will even work. Its made by Broken_Code and i found it here.
http://forum.thegamecreators.com/?m=forum_view&t=180856&b=1
Here is the code. Oh and i forgot to mention for the multiplayer part of the source. Thanks and if it cant be added thanks anyway
InitateRadar:
RadarScale#=0.01 `Change this with speed?
`make a radar object - a limb for each object shown on radar- including limb 0
RadarObject = FreeObject() : make object plain RadarObject,0,0
temp_mesh = FreeMesh() : make mesh from object temp_mesh,RadarObject
for t=1 to NetMaxPlayers
add limb RadarObject,t,temp_mesh
color limb RadarObject,t,RGB(236,49,63)
REMSTART
if NetPlayer(t).Ally=1
color limb RadarObject,t,RGB(34,203,0)
else
color limb RadarObject,t,RGB(236,49,63)
endif
REMEND
next t
delete mesh temp_mesh
lock object on RadarObject `lock to screen. object position coordinates now refer to coordinates in frame of camera.
set object RadarObject,1,0,0,0,0,0,0 `make fully lit. also culling on is wasteful
`make a textured object to show where radar centre etc is
bmp = FreeBitMap() : create bitmap bmp,256,256 : set current bitmap bmp`pixels range from 0-255 if i remember right
ink rgb(255,255,255),0 : circle 128,128,126 : line 0,128,256,128 : line 128,0,128,256 `circle and lines
RadarImage = FreeImage() : get image RadarImage ,0,0,256,256 : delete bitmap bmp
RadarBackground = FreeObject() : make object plain RadarBackground,10,10 : texture object RadarBackground,RadarImage
lock object on RadarBackground
set object RadarBackground,1,0,0,1,0,0,0
ghost object on RadarBackground : disable object zwrite RadarBackground
`mess around with these values to move the radar around.
`make sure the two objects have the same position.
`the radar can be made to look smaller by moving it forwards
position object RadarObject, RPX#,RPY#,RPZ# `x is to the right of centre, y is above centre, z is how far into screen..
position object RadarBackground, RPX#,RPY#,RPZ#
return
Radar:
`inc RadarScale#,0.01*(rightkey()-leftkey())
`get the positions of things relative to player and convert to radar positions..
for t=1 to NetMaxPlayers
if t<> LocalPlayer
radar_x#=0.0-RadarScale#*(NetPlayerPosition#(t,1)-px#) : radar_y#=RadarScale#*(NetPlayerPosition#(t,3)-pz#)
distsq#=radar_x#*radar_x#+radar_y#*radar_y#
if distsq#<25.0 `Make this square later
offset limb RadarObject,t,radar_x#,radar_y#,0
show limb RadarObject,t
else
hide limb RadarObject,t
endif
endif
next n
zrotate object RadarObject,Player_Yangle#
return
A lot of my FPSC media can be found here. Hope you guys stop in. http://fpscfree.webs.com/