Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there an easier way to do this?
Nikson. Offline
Member

Posts: 134
Threads: 22
Joined: Feb 2013
Reputation: 4
#1
Is there an easier way to do this?

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?
04-03-2014, 02:44 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Is there an easier way to do this?

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: (Select All)
for(int i 0<= 10i++) {
    
AddTimer(ii"TimerDisableLight");


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

PHP Code: (Select All)
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.

(This post was last modified: 04-03-2014, 03:28 PM by Mudbill.)
04-03-2014, 03:26 PM
Find
Nikson. Offline
Member

Posts: 134
Threads: 22
Joined: Feb 2013
Reputation: 4
#3
RE: Is there an easier way to do this?

(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: (Select All)
for(int i 0<= 10i++) {
    
AddTimer(ii"TimerDisableLight");


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

PHP Code: (Select All)
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!
04-03-2014, 03:37 PM
Find




Users browsing this thread: 2 Guest(s)