Jump to content

Markers won't turn transparent.


Ab-47

Recommended Posts

I've been making a script, and for some reason the markers just WON'T turn transparent. 'setElementVisibleTo' works, but setElementAlpha doesn't, neither does it work if I try creating the markers with transparency nil.

  
local crrx = {} 
local crry = {} 
local crrz = {} 
local rally_checkpoints = {} 
  
local checkpointData = { 
    [1] = {x, y, z}, 
    [2] = {x, y, z}, 
    [3] = {x, y, z}, 
    [4] = {x, y, z}, 
    [5] = {x, y, z}, 
    [6] = {x, y, z}, 
    [7] = {x, y, z}, 
    [8] = {x, y, z}, 
    [9] = {x, y, z}, 
    [10] = {x, y, z}, --Finish Line 
} 
  
    crrx[1], crry[1], crrz[1] = unpack(checkpointData[1]) 
    crrx[2], crry[2], crrz[2] = unpack(checkpointData[2]) 
    crrx[3], crry[3], crrz[3] = unpack(checkpointData[3]) 
    crrx[4], crry[4], crrz[4] = unpack(checkpointData[4]) 
    crrx[5], crry[5], crrz[5] = unpack(checkpointData[5]) 
    crrx[6], crry[6], crrz[6] = unpack(checkpointData[6]) 
    crrx[7], crry[7], crrz[7] = unpack(checkpointData[7]) 
    crrx[8], crry[8], crrz[8] = unpack(checkpointData[8]) 
    crrx[9], crry[9], crrz[9] = unpack(checkpointData[9]) 
    crrx[10], crry[10], crrz[10] = unpack(checkpointData[10]) 
  
    rally_checkpoints[1] = createMarker(crrx[1], crry[1], crrz[1], "checkpoint", 4.0, 255, 0, 0, 0) 
    rally_checkpoints[2] = createMarker(crrx[2], crry[2], crrz[2], "checkpoint", 4.0, 255, 0, 0, 0) 
    rally_checkpoints[3] = createMarker(crrx[3], crry[3], crrz[3], "checkpoint", 4.0, 255, 0, 0, 0) 
    rally_checkpoints[4] = createMarker(crrx[4], crry[4], crrz[4], "checkpoint", 4.0, 255, 0, 0, 0) 
    rally_checkpoints[5] = createMarker(crrx[5], crry[5], crrz[5], "checkpoint", 4.0, 255, 0, 0, 0) 
    rally_checkpoints[6] = createMarker(crrx[6], crry[6], crrz[6], "checkpoint", 4.0, 255, 0, 0, 0) 
    rally_checkpoints[7] = createMarker(crrx[7], crry[7], crrz[7], "checkpoint", 4.0, 255, 0, 0, 0) 
    rally_checkpoints[8] = createMarker(crrx[8], crry[8], crrz[8], "checkpoint", 4.0, 255, 0, 0, 0) 
    rally_checkpoints[9] = createMarker(crrx[9], crry[9], crrz[9], "checkpoint", 4.0, 255, 0, 0, 0) 
    rally_checkpoints[10] = createMarker(crrx[10], crry[10], crrz[10], "checkpoint", 4.0, 255, 255, 255, 0) 
  

1) No this isn't the full code;

2) I've layed the code out like this to diagnose the error but find no luck.

3) I've made the coods x, y, z no purpose, I'm using their real location in the full code.

4) No debug errors and I see all markers.

As you can see, I've set the transparency for each marker created to 0. It always shows no matter what.

If anyone can help me, I'd be more than grateful.

Link to comment
It should work. If not you can do small workaround. Set marker size to 0 or set dimension.

Setting it's colour works, however setting it's alpha value doesn't

This resource is for a big server, so settings it's dimension is a bad idea as that dimension could be used in an event or taken up already by another resource, yeah I know there's like hundreds of thousands of dimensions, but I won't take the risk. Setting marker size to 0, could do that, but I wanted to get the proper solution to this issue. At-least so I can learn from where I went wrong. Also, if I were to do a small workaround, I could use setElementVisibleTo.. I just need the proper solution.

Thanks for your help though.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...