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
Thunder and Lightning
Nuclearbones Offline
Junior Member

Posts: 45
Threads: 19
Joined: May 2012
Reputation: 0
#7
RE: Thunder and Lightning

(07-21-2012, 02:42 PM)andyrockin123 Wrote:
(07-21-2012, 02:26 PM)Nuclearbones Wrote: Is this so that the lightning happens at random times?

void OnStart()
{
AddTimer("", RandInt(10, 30), "Lightning_FX");
}

void Lightning_FX(string &in asTimer)
{
AddTimer("", RandInt(10, 30), "Lightning_FX");

CreateParticleSystemAtEntity("ThunderParticle_1", "ps_electro_bolt.ps", "ThunderScriptArea_1", false);
}


Fun with random integers! It will randomly pick a time (in seconds) between 10 and 30 seconds. Truly random. You can adjust those intervals if you think its too long/short a time.
Thanks for the tip broski
07-21-2012, 06:09 PM
Find


Messages In This Thread
Thunder and Lightning - by Nuclearbones - 07-12-2012, 06:14 PM
RE: Thunder and Lightning - by SilentStriker - 07-12-2012, 08:31 PM
RE: Thunder and Lightning - by Nuclearbones - 07-21-2012, 05:59 AM
RE: Thunder and Lightning - by FlawlessHappiness - 07-21-2012, 12:53 PM
RE: Thunder and Lightning - by Nuclearbones - 07-21-2012, 02:26 PM
RE: Thunder and Lightning - by Adny - 07-21-2012, 02:42 PM
RE: Thunder and Lightning - by Nuclearbones - 07-21-2012, 06:09 PM



Users browsing this thread: 1 Guest(s)