okay will try.
But why don't they work anymore? My entire game is useless right now. I can't release the update because of this. It's just extremely frustrating.
edit: Look here
I managed to move the position to the middle but I tried everything and still can't find the line that changes the "height" value. Where is it?
local showing = {}
local sprite = {}
local image = {}
pressed = 0
local xpos = 30 --where the top left of the sprite will be
local ypos = 0 --where the top left of the sprite will be
local sprite_size = 40 --% of the screen the sprite will take up
local folder = "scriptbank\\instructions\\" --where the images are found within GG files (remember to put the \\ in and again at the end.. i.e. "scriptbank\\images\\")
--the name of the entity must match the name of the image to show (remember to include the file type)
function note_sprite_init_name(e,name)
showing[e] = 0
image[e] = LoadImage(folder..tostring(name))
end
function note_sprite_main(e)
if sprite[e] == nil then
sprite[e] = CreateSprite(image[e])
SetSpriteSize(sprite[e],sprite_size,sprite_size)
SetSpritePosition(sprite[e],500,500)
else
if PlayerLooking(e,100,20) == 1 then
PromptLocal(e,"Note [E]")
if g_KeyPressE == 1 and pressed == 0 then
pressed = 1
PlaySound(e,0)
if showing[e] == 0 then
showing[e] = 1
SetSpritePosition(sprite[e],xpos,ypos)
else
showing[e] = 0
SetSpritePosition(sprite[e],500,500)
end
end
else
if showing[e] == 1 then
SetSpritePosition(sprite[e],500,500)
showing[e] = 0
end
end
end
if GetScancode() == 0 then
pressed = 0
end
end
function PlayerLooking(e,dis,v)
if g_Entity[e] ~= nil then
if dis == nil then
dis = 3000
end
if v == nil then
v = 0.5
end
if GetPlayerDistance(e) <= dis then
local destx = g_Entity[e]['x'] - g_PlayerPosX
local destz = g_Entity[e]['z'] - g_PlayerPosZ
local angle = math.atan2(destx,destz)
angle = angle * (180.0 / math.pi)
if angle <= 0 then
angle = 360 + angle
elseif angle > 360 then
angle = angle - 360
end
while g_PlayerAngY < 0 or g_PlayerAngY > 360 do
if g_PlayerAngY <= 0 then
g_PlayerAngY = 360 + g_PlayerAngY
elseif g_PlayerAngY > 360 then
g_PlayerAngY = g_PlayerAngY - 360
end
end
local L = angle - v
local R = angle + v
if L <= 0 then
L = 360 + L
elseif L > 360 then
L = L - 360
end
if R <= 0 then
R = 360 + R
elseif R > 360 then
R = R - 360
end
if (L < R and math.abs(g_PlayerAngY) > L and math.abs(g_PlayerAngY) < R) then
return 1
elseif (L > R and (math.abs(g_PlayerAngY) > L or math.abs(g_PlayerAngY) < R)) then
return 1
else
return 0
end
else
return 0
end
end
end
Modder, Soundtrack Composer and now Game Developer. Well, sort of.
Windows 10 64bit - Intel Core i7-2600 CPU @ 3.40GHz, 8,0 GB Ram, AMD Radeon R9 270X
Youtube:
(Music Channel) The German Music Dude: https://www.youtube.com/user/DeutscherVolker
(Games and Mods Channel ) DK Productions: https://www.youtube.com/channel/UCIqwvScXnJL_zNYqSsfTCqA