Help Nedded (minor)

#1
I need help i done over 90% job to post my mod but i can't do one thing. there is code responsible for displaing the map on navigator
Spoiler

Code: Select all

x = x - 19 + ((EntityX(Collider) - 4.0) Mod 8.0)*3
y = y + 14 - ((EntityZ(Collider)-4.0) Mod 8.0)*3
For x2 = Max(1, PlayerX - 4) To Min(MapWidth - 1, PlayerX + 4)
	For z2 = Max(1, PlayerZ - 4) To Min(MapHeight - 1, PlayerZ + 4)
		If CoffinDistance > 16.0 Or Rnd(16.0)<CoffinDistance Then 
			If MapTemp(x2, z2) And (MapFound(x2, z2) > 0 Or SelectedItem\itemtemplate\name = "S-NAV 310 Navigator" Or SelectedItem\itemtemplate\name = "S-NAV Navigator Ultimate") Then
				Local drawx% = x + (PlayerX - x2) * 24 , drawy% = y - (PlayerZ - z2) * 24 
										
				Color (30,30,30)
				If SelectedItem\itemtemplate\name = "S-NAV Navigator" Then Color(100, 0, 0)
										
				If MapTemp(x2 + 1, z2) = False Then Line(drawx - 12, drawy - 12, drawx - 12, drawy + 12)
				If MapTemp(x2 - 1, z2) = False Then Line(drawx + 12, drawy - 12, drawx + 12, drawy + 12)
											
				If MapTemp(x2, z2 - 1) = False Then Line(drawx - 12, drawy - 12, drawx + 12, drawy - 12)
				If MapTemp(x2, z2 + 1)= False Then Line(drawx - 12, drawy + 12, drawx + 12, drawy + 12)
			End If
		EndIf
	Next
Next
and here is mine
Spoiler

Code: Select all

x = x - 19 + ((EntityX(Collider) - 4.0) Mod 8.0)*3
y = y + 14 - ((EntityZ(Collider)-4.0) Mod 8.0)*3
For x2 = Max(1, PlayerX - 4) To Min(MapWidth - 1, PlayerX + 4)
	For z2 = Max(1, PlayerZ - 4) To Min(MapHeight - 1, PlayerZ + 4)
		
		If CoffinDistance > 16.0 Or Rnd(16.0)<CoffinDistance Then 
			If MapTemp(x2, z2)
				Local drawx% = x + (PlayerX - x2) * 24 , drawy% = y - (PlayerZ - z2) * 24 
						
				Color (255,155,0)
							
				If MapTemp(x2 + 1, z2) = False Then Line(drawx - 12, drawy - 12, drawx - 12, drawy + 12)
				If MapTemp(x2 - 1, z2) = False Then Line(drawx + 12, drawy - 12, drawx + 12, drawy + 12)
							
				If MapTemp(x2, z2 - 1) = False Then Line(drawx - 12, drawy - 12, drawx + 12, drawy - 12)
				If MapTemp(x2, z2 + 1)= False Then Line(drawx - 12, drawy + 12, drawx + 12, drawy + 12)
			EndIf
		EndIf	
	Next
Next
The problem is the second doesn't work and i don't know why (i tried to solve this for three days sorry if it's something simple)
oh and my x and y equal
x=GraphicWidth - 293*0.5+20
y=GraphicHeight - 268*0.4-85
Last edited by Hisamera on Sun Sep 14, 2014 9:00 pm, edited 1 time in total.
Hello there is a mod where you can participate Better SCP-914. with your help 914 will be properly complicated and unpredictable :P You can help with theory or code, even an sugestion will be greatly apreciated :D

Re: Help Nedded (minor)

#4
InnocentSam wrote:And for future reference, use the

Code: Select all

 tag for code as it makes it retain its formatting, making it easier to read.[/quote]


Ok thanks by the way

juanjpro i was thinking about what you are saying but i couldn't find code responsible for that. If you could pinpoint that i can go on from there.

that would be hard to do i'm trying to draw it always in the same location AND for it to looking better i'm trying to do this with overlay(thanks for that too BTW)

if you would have monitor lets say like this
[spoiler]-------------------------------------------
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
-------------------------------------------[/spoiler]

then i it should be there

[spoiler]-------------------------------------------
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxxxxxxxxxxxxxxxxxxxxxxxxxxxx|
|xxxxxxxxxxxxxxxxxxxxxx----------|
|xxxxxxxxxxxxxxxxxxxxx|yyyyyyyy|
|xxxxxxxxxxxxxxxxxxxxx|yyyyyyyy|
|xxxxxxxxxxxxxxxxxxxxx|yyyyyyyy|
-------------------------------------------

where the "y"[/spoiler]

[spoiler]i'm kind of douche i have 17 years and i'm trying to do something by myself but i have computer for only about 2 years and i'm trying to understand as much as i can but apparently i'm too stupid.[/spoiler]
Hello there is a mod where you can participate Better SCP-914. with your help 914 will be properly complicated and unpredictable :P You can help with theory or code, even an sugestion will be greatly apreciated :D