The 'Real World Examples' Thread

Post your own tutorials, guides and demos.

Post » Tue Apr 21, 2009 3:28 pm

That's correct.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Wed Apr 22, 2009 12:11 am

Edit: I had a look at the wiki again and Huzzah I did it!
Objective:
Make incremental variables.
Info:-
Resource:


I've made a private variable on the object that is spawning the enemies (ZombieSpawner) and I've called it ZombieSpawnTime

The private variable will have an initial value of say 10 seconds.
In the first 10 seconds it will spawn a zombie, and times the variable by 0.9 (to stop the value going into negative numbers).
Now 9 seconds later it will do the same thing again, and so on and so on...

[code:1gu8ckdk]+Every ZombieSpawner('ZombieSpawnTime)' milliseconds
-ZombieSpawner Spawn object Zombie on blablabla
-ZombieSpawner set "ZombieSpawnTime" to 0.9*ZombieSpawner('ZombieSpawnTime')[/code:1gu8ckdk]

*The first line is accessing the private variable set on the ZombieSpawner
*The second simply spawns the object
*The third is trying to edit that value by multiplying it by 0.9
B
2
G
3
Posts: 40
Reputation: 930

Previous

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest