1
parse("explosion x y size damage source_player")
I made this script so that people will see how one can use recursion (http://en.wikipedia.org/wiki/Recursion) in lua.
1st way: say !go
This will make explosion in all walkable area relative to you (screenshot 1). It looks quite nice, but might make some lag.
ATTENTION: dont say "!go" twice, wait before the first one is finished.
2nd way: say !shoot
This is like a ball, which reflects from walls (sometimes it fails due to the structure of cs2d itself), but as this 'ball' goes it makes explosions on the way (screenshots 2-3)
3rd way: say !hunt
finds a random enemy and 'walks' to him making explosions on its way. There are 2 ways how the explosion finds path to the victim (see code). Screenshot 4.
P.S. the main purpose of this code is for people, who are not so good in lua/programming to see how things can be done.
Approved by GeoB99
Download
2 kb, 632 Downloads