Data Realms Fan Forums
http://45.55.195.193/

Objects that generate money and give money to the enemy.
http://45.55.195.193/viewtopic.php?f=1&t=18088
Page 1 of 1

Author:  RRR1 [ Fri Mar 12, 2010 2:11 am ]
Post subject:  Objects that generate money and give money to the enemy.

I want to do a sort of "generator" that gives you 10oz every 30 seconds. and I want it so that when the enemy destroys it, it gives the enemy 2000oz. but, how whould I do it? I already have the sprites.

Author:  Azukki [ Fri Mar 12, 2010 3:23 am ]
Post subject:  Re: Objects that generate money and give money to the enemy.

Make an Actor. Not an AHuman, an Actor, like the brain case. But in the actors group, and not the brain group.

Make an emitter that emits 0.2835 kg MOPixels of gold material at an emission rate of 2. EmissionsIgnoreThis or whatever should be 0.

Make a Lua script, that, upon the destruction of the actor, adds 2000 gold to the opposite team's funds.

Attach the emitter to the actor, in the center. Apply the script to the actor.

(if the gold collection sound bothers you, you could replace the function of the emitter with some script in the update function)

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/