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
Script Help Need help with hazards
ooadrianoo Offline
Member

Posts: 82
Threads: 29
Joined: Apr 2012
Reputation: 0
#6
RE: Need help with hazards

(09-22-2012, 02:16 AM)Your Computer Wrote: You don't explain much in what exactly you're trying to achieve, nor does your code allow me to make safe assumptions. Nevertheless, i'd rewrite your code like so:

PHP Code: (Select All)
void OnStart()
{
    
AddTimer("barrel_"+RandInt(16), 1"ActivateBarrel");
}

void ActivateBarrel(string &in barrel)
{
    
SetEntityActive(barreltrue);
    
AddTimer(barrel2"RemoveBarrel");
}

void RemoveBarrel(string &in barrel)
{
    
SetEntityActive(barrelfalse);



I just wanted to set random barrels active. So if they is a barrel active (checked by GetEntityExists), then this barrel should be deactivated in a few seconds.

This process should not stop.
09-22-2012, 09:44 AM
Find


Messages In This Thread
Need help with hazards - by ooadrianoo - 09-22-2012, 01:55 AM
RE: Need help with hazards - by Adny - 09-22-2012, 02:02 AM
RE: Need help with hazards - by Your Computer - 09-22-2012, 02:03 AM
RE: Need help with hazards - by ooadrianoo - 09-22-2012, 02:05 AM
RE: Need help with hazards - by Your Computer - 09-22-2012, 02:16 AM
RE: Need help with hazards - by ooadrianoo - 09-22-2012, 09:44 AM
RE: Need help with hazards - by WALP - 09-22-2012, 10:24 AM



Users browsing this thread: 1 Guest(s)