Frictional Games Forum (read-only)

Full Version: Is there an easier way to do this?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a question, if you want to throw any object at a prop to break it, do you have to nake tons if addentitycollides? I know about the for function too, is there another way? And also, if you're using for to shut lights and you want each light to shut each second, how to do it?
I haven't messed around much with ropes, but if you need to use a for loop to disable lights one second after the other, use something like this:

PHP Code:
for(int i 0<= 10i++) {
    
AddTimer(ii"TimerDisableLight");


Edit 10 in the loop for as many lights you have.

PHP Code:
void TimerDisableLight(string &in asTimer)
{
    
FadeLightTo("LightName_"asTimer000001);


I imagine something like that would work fine. Tell me if you have any problems with it.
(04-03-2014, 03:26 PM)Mudbill Wrote: [ -> ]I haven't messed around much with ropes, but if you need to use a for loop to disable lights one second after the other, use something like this:

PHP Code:
for(int i 0<= 10i++) {
    
AddTimer(ii"TimerDisableLight");


Edit 10 in the loop for as many lights you have.

PHP Code:
void TimerDisableLight(string &in asTimer)
{
    
FadeLightTo("LightName_"asTimer000001);


I imagine something like that would work fine. Tell me if you have any problems with it.

Thank you very much Mudbill! You're awesome!