File: alien_timer.txt

package info (click to toggle)
nikwi 0.0.20120213-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,616 kB
  • ctags: 1,224
  • sloc: cpp: 7,111; ansic: 879; objc: 247; makefile: 142; sh: 48
file content (18 lines) | stat: -rw-r--r-- 318 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
# Timer script for alien
#

Object	obj = getThisObject();
int	tick = getObjectVar(obj, 0);

if (tick == 10)
{
	setObjectSolidness(createParticleObject(makeCode("abll"), 
		getObjectXPosition(obj) + 32,
		getObjectYPosition(obj) + 29,
		rand()*360.0, 1.5, 1000), true);
	tick = 0;
}

setObjectVar(obj, 0, tick + 1);