Team Spartan Cookies & Milk Forums
Starfall Help - Printable Version

+- Team Spartan Cookies & Milk Forums (https://teamscm.co.uk)
+-- Forum: Garry's Mod (https://teamscm.co.uk/forum-4.html)
+--- Forum: Starfall (https://teamscm.co.uk/forum-7.html)
+--- Thread: Starfall Help (/thread-937.html)

Pages: 1 2 3 4 5


RE: Starfall Help - Alanzote - 26-05-2015

(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.

SuperPlayer
Ops quota execeeded my ship is TOO BIG!


RE: Starfall Help - SuperPlayer - 26-05-2015

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.

SuperPlayer


RE: Starfall Help - Person8880 - 26-05-2015

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.


RE: Starfall Help - Alanzote - 26-05-2015

(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


RE: Starfall Help - TheOneAndOnlyTee - 27-05-2015

Alan i'd recommend checking out how Rouing does it in his Aura EVE chip.


RE: Starfall Help - Red The Blue Color - 27-05-2015

(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.


RE: Starfall Help - TheOneAndOnlyTee - 27-05-2015

seems rouing hasn't been able to fix his lib/getConstraints or the EVE chip since the deprecations were removed, tried fixing but with no luck.


RE: Starfall Help - Alanzote - 27-05-2015

(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)


RE: Starfall Help - Person8880 - 27-05-2015

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.


RE: Starfall Help - Alanzote - 27-05-2015

(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.