Frictional Games Forum (read-only)
Is there an easier way to do this? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Is there an easier way to do this? (/thread-24988.html)



Is there an easier way to do this? - Nikson. - 04-03-2014

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?


RE: Is there an easier way to do this? - Mudbill - 04-03-2014

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.


RE: Is there an easier way to do this? - Nikson. - 04-03-2014

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