Login
Sign Up


You are using the mobile version of the forum, some features have been disabled to have it responsive.
Limelight Reunion 2024 - v4b1Limelight Discord
Ares Defence Services Discord
Limelight Reunion 2024 - v4b1Limelight DiscordAres Defence Services Discord

receiptDevelopment Blog:

Development Contributor Workflow

receiptHR Blog:

What *are* they doing over there?

receiptTeacher Blog:

Insight into the Teacher Team

receiptDevelopment Blog:

Infrastructure Upgrade 11/2019

receiptDevelopment Blog:

how suggestions???

receiptDevelopment Blog:

Planning for the future.


This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Photoning
Doctor Internet radio_button_checked
Management, Developer, Administrator, Business Adviser, DPO, Security
Core Manager
Posts: 12,551
Threads: 1,763
Likes Given: 425
Likes Recieved: 3472 in 1670 posts
Joined: Aug 2015
Reputation: 35
#16
Apr 24, 2017, 10:36 AM
Running Lights

Start with setting up your table. It's like your EMV table from before.
Code:
local PI = {}

PI.Meta
It's the exact same as the meta for emergency lights.

Here's an example for the Crown Victoria's tail light.
Code:
tail_light = { -- Set the name of the light.
    AngleOffset = 90, -- The anglular offset.
    W = 8.5, -- Size of the sprite.
    H = 9,
    Sprite = "sprites/emv/crownvic_tail", -- The material.
    Scale = 1, -- The glow multiplier.
    WMult = 1, -- Not a clue.
},

PI.Positions
Again, the same as emergency lighting. Set the positions of your lights.

An example, for the Crown Victoria's tail light.
Code:
[1] = {Vector(-31.8,-111.15,41.1), Angle(0,-20,-10), "tail_light"},

Breaking this down.
Code:
[lightIndex :: Integer] = {Position :: Vector, Rotation :: Angle, Light Meta :: String}

PI.States
This is the equivalent of the combination of EMV.Sections, EMV.Patterns and EMV.Sequences.

There are 6 states. Headlights, Breaks, Blink_Left, Blink_Right, Reverse and Running.
Headlights are not working, so I don't bother filling them in.
Inside the brackets you fill in the lights and colours, similar to EMV.Sections.

The blinkers toggle on and off, with a pattern similar to 1,1,1,0,0,0.
Hazards are created by toggling both left and right blinkers.

Here's an example from the Crown Victoria's lights.
Code:
PI.States = {
    ["Headlights"] = {}, -- Doesn't work. Leave them.
    ["Brakes"] = {{1, DR}, {2, DR}, {3, DR}, {4, DR}, {5, DR}}, -- Rear Lights, Breaking.
    ["Blink_Left"] = {{1, DR}, {3, DR}, {14, A}, {16, SW}}, -- Left Blinkers
    ["Blink_Right"] = {{2, DR}, {4, DR}, {15, A}, {17, SW}}, -- Right Blickers
    ["Reverse"] = {{10, SW}, {11, SW}}, -- Reverse Lights
    ["Running"] = {
        {1, DR, .25}, {2, DR, .25}, {3, DR, .25}, {4, DR, .25}, {12, DR, .25}, {13, DR, .25},
        {6, SW}, {7, SW}, {8, A, .8}, {9, A, .8} -- General Running Lights.
        -- For the tail lights, I set them to be a quarter of the brightness of the "real" break lights.
    },
}

Finally
Fill all those in, then stick this at the end of your code.
Depending on what you're doing, you'll generally do the first, and sometimes the second.

Code:
if Photon then
    Photon:OverwriteIndex("2011 Ford Crown Vic Police", PI)
    Photon.VehicleLibrary["sgm_2011fcvpho"] = PI
end

If you're doing multiple vehicles with the same base model, you can set the Vehicle Library.
An example from my Crown Victoria, inside the vehicle list.
Code:
    IsEMV = true,
    EMV = EMV,
    HasPhoton = true,
    Photon = "sgm_2011fcvpho"

However, if you're only doing one vehicle, you can also set it in the same file.
An example from my Merc Sprinter.
Code:
    IsEMV = true,
    EMV = EMV,
    HasPhoton = true,
    Photon = PI
    
    ...
    
    if Photon then Photon:OverwriteIndex( name, PI ) end

Both methods work, so there is no "best practice". Do what's best for you.



@Nebula. Sorry I posted it anyway. You posted about 20 seconds before I did.
@Noble smells. :3
For Data Protection Queries, please email info@limelightgaming.net.
For Business, Contributor or Development queries, please PM me.
For Appeals, please post in the relevant subforum.
For Security Information, your best bet is to speak to Burnett.
(This post was last modified: Apr 24, 2017, 10:44 AM by Doctor Internet.)
The following 4 users Like Doctor Internet's post:
  • Nebula, Noble, Nudel, ZooM
Nebula radio_button_checked
Where are your fingers?
Membership
Posts: 2,270
Threads: 254
Likes Given: 518
Likes Recieved: 1042 in 728 posts
Joined: Sep 2015
Reputation: 8
#17
Apr 24, 2017, 11:11 AM
@Doctor Internet Oh, many Thanks. I did not got the running lights to work (but I only tried 5 minutes because time reasons) and this explain quite some more stuff, so.. thank you Big Grin

(Do you also know how to add liveries?)
(This post was last modified: Apr 24, 2017, 11:16 AM by Nebula.)
The following 1 user Likes Nebula's post:
  • ZooM
Doctor Internet radio_button_checked
Management, Developer, Administrator, Business Adviser, DPO, Security
Core Manager
Posts: 12,551
Threads: 1,763
Likes Given: 425
Likes Recieved: 3472 in 1670 posts
Joined: Aug 2015
Reputation: 35
#18
Apr 24, 2017, 11:25 AM
Liveries

For some reason, the livery code is messed up. It works, but is messed up.

Firstly, you'll need to set your spawning skin.
An example from my Sprinter.
Code:
EMV.Skin = "emvu_skins/merc_sprinter_lwb/livery_police_speed"

In this case, materials/emvu_skins/merc_sprinter_lwb/livery_police_speed is a vmt, vtf pair, so it loads the material as a skin.
You could also set the skin to one of the default skins like so.
Code:
EMV.Skin = 1

Next, liveries.
For some reason, it was decided that you need categories, but they don't show up in the menu.

An example from the Sprinter.
Code:
EMV.Liveries = {
    ["Police"] = {
        ["Speed Enforcement"] = "emvu_skins/merc_sprinter_lwb/livery_police_speed",
        ["Prison Transport"] = "emvu_skins/merc_sprinter_lwb/livery_prison",
        ["SWAT"] = "emvu_skins/merc_sprinter_lwb/livery_swat",
    },
    ["EC:FD"] = {
        ["EMS"] = "emvu_skins/merc_sprinter_lwb/livery_ems",
    },
    ["Penis"] = {
        ["FUMUKU"] = "emvu_skins/merc_sprinter_lwb/dem_hummers_tho",
        ["Lionscrest"] = "emvu_skins/merc_sprinter_lwb/obey_and_survive",
    },
}

In this case, the liveries shown would be:
  • Speed Enforcement
  • Prison Transport
  • SWAT
  • EMS
  • FUMUKU
  • Lionscrest
For Data Protection Queries, please email info@limelightgaming.net.
For Business, Contributor or Development queries, please PM me.
For Appeals, please post in the relevant subforum.
For Security Information, your best bet is to speak to Burnett.
The following 3 users Like Doctor Internet's post:
  • Nebula, Nudel, ZooM
Nebula radio_button_checked
Where are your fingers?
Membership
Posts: 2,270
Threads: 254
Likes Given: 518
Likes Recieved: 1042 in 728 posts
Joined: Sep 2015
Reputation: 8
#19
Apr 29, 2017, 10:41 AM
@Doctor Internet

I just noticed that i dont know what to enter there, so.. What does Photon wants to have there ?

Quote:Code:
if Photon then
Photon:OverwriteIndex("2011 Ford Crown Vic Police", PI)
Photon.VehicleLibrary["sgm_2011fcvpho"] = PI
end
The following 1 user Likes Nebula's post:
  • ZooM




Users browsing this thread: 1 Guest(s)