(25-05-2015, 11:13 PM)SuperPlayer Wrote: Well this what i am showing you now i have never tested so i dont know if it works
function redAllert()
for I = 1,#Props/2 do
setSubMaterialB(Props[I], "cmats/base_metal_light", "cmats/flash_red")
end
timer.simple(1,function()
for I = #Props/2 ,#Props do
setSubMaterialB(Props[I], "cmats/base_metal_light", "cmats/flash_red")
end
end)
end
Maybe it works. I dont know. But when i am in game again i will try to find a solution for you.
The only way i can think of right now is to set the timer value up. Maybe from 1 to 2. But today after school i will look into your problem if it isnt solved then.
I am sorry i cant help you more right now.
Basically, you need to make use of something I added yesterday for this purpose:
local Corridors = ents.self():getConstraints( function( Ent )
return Ent:class() == "prop_physics" and Ent:model():find( "models/whatever/path/you/want" )
end )
Do that once at the start of the code and then use the Corridors table for when you change the sub-materials later. I'd hope you don't have a massive amount of corridor props compared to exterior props so it should be fine ops-wise later, and the filter should make sure you don't exceed when starting up.
If you for some reason have way too much going on in the code on first run you might still hit issues, in that case, just delay it like so:
local Corridors
timer.simple( 1, function()
Corridors = ents.self():getConstraints( function( Ent )
return Ent:class() == "prop_physics" and Ent:model():find( "models/whatever/path/you/want" )
end )
end )
and I'd hope that'll work fine.
26-05-2015, 09:51 PM, (This post was last modified: 26-05-2015, 10:48 PM by Alanzote.)
(26-05-2015, 05:52 PM)Person8880 Wrote: Basically, you need to make use of something I added yesterday for this purpose:
local Corridors = ents.self():getConstraints( function( Ent )
return Ent:class() == "prop_physics" and Ent:model():find( "models/whatever/path/you/want" )
end )
Do that once at the start of the code and then use the Corridors table for when you change the sub-materials later. I'd hope you don't have a massive amount of corridor props compared to exterior props so it should be fine ops-wise later, and the filter should make sure you don't exceed when starting up.
If you for some reason have way too much going on in the code on first run you might still hit issues, in that case, just delay it like so:
local Corridors
timer.simple( 1, function()
Corridors = ents.self():getConstraints( function( Ent )
return Ent:class() == "prop_physics" and Ent:model():find( "models/whatever/path/you/want" )
end )
end )
and I'd hope that'll work fine.
Still havn't see if it works, but what I do If there are more than 1 model I want to search?
EDIT: tested it, not working, it doesn't search
(27-05-2015, 02:11 AM)T-16 Wrote: Alan i'd recommend checking out how Rouing does it in his Aura EVE chip.
Last I checked the EVE chip doesn't work with big ships either.
"with it's superior software, i have no doubt it will succeed in finding fuck all" - T-17, 2016
[Super Member] [ENCOM] т-ѕсм.Red The Blue Color™: server do you support Hitler?
[Server] srcds_linux: The probabilty is about 99.99%, so interpret that how you want to.
(26-05-2015, 05:52 PM)Person8880 Wrote: Basically, you need to make use of something I added yesterday for this purpose:
local Corridors = ents.self():getConstraints( function( Ent )
return Ent:class() == "prop_physics" and Ent:model():find( "models/whatever/path/you/want" )
end )
Do that once at the start of the code and then use the Corridors table for when you change the sub-materials later. I'd hope you don't have a massive amount of corridor props compared to exterior props so it should be fine ops-wise later, and the filter should make sure you don't exceed when starting up.
If you for some reason have way too much going on in the code on first run you might still hit issues, in that case, just delay it like so:
local Corridors
timer.simple( 1, function()
Corridors = ents.self():getConstraints( function( Ent )
return Ent:class() == "prop_physics" and Ent:model():find( "models/whatever/path/you/want" )
end )
end )
and I'd hope that'll work fine.
it can only use 3 models(check with if and elseif)
Considering you're likely using a single part set, all the corridor parts should be in the same folder path. For modbridge you'd just have:
local Corridors = ents.self():getConstraints( function( Ent )
return Ent:class() == "prop_physics" and Ent:model():find( "models/cerus/modbridge/core" )
end )
(27-05-2015, 05:40 PM)Person8880 Wrote: Considering you're likely using a single part set, all the corridor parts should be in the same folder path. For modbridge you'd just have:
local Corridors = ents.self():getConstraints( function( Ent )
return Ent:class() == "prop_physics" and Ent:model():find( "models/cerus/modbridge/core" )
end )
That will find every interior modbridge prop.
It finds all and no crash, until I write "/computer alert red" part of my ship becomes red and the other continues white.