Urban Wars
March 29, 2024, 02:54:30 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome, here you will find all the information on Urban Wars
 
  Home Help Search Staff List Login Register  

Randomly spawning a different sprite

Pages: [1] 2
  Print  
Author Topic: Randomly spawning a different sprite  (Read 905 times)
Mexicouger
Lieutenant
*
Posts: 111


View Profile
« on: April 23, 2010, 11:56:56 pm »

So my code was the debris code. a basic  spawn an dthink function with a bouncing func. then in effects, create explosion, I added while local float i, r;  (i < r) { debris(self.origin) i + 1 = 1 }    that was the code. I`m on my cellphone so it`  abit jumbled. I got the code right in meaning that before, the debris randomly shot out of an explosion. It all worked well but I wanted the code to be more efficient rather than hackish. So am I supposed to ad donto that  loop like add while (i<r) { debris(self.origin); i + 1 = 2; } ? or will the func just loop like that. And the sprites do come out right. I just wonder why It won`t properly work.
Report Spam   Logged
Pages: [1] 2
  Print  
 
Jump to:  


Get your own Chat Box! Go Large!
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy