How to do types of damage
zajinakajazz
Member Posts: 43
Hello I'm making a Tower Defense game and i'd like to tweak several types of damage but I'm not really sure how to work on it.
So far I all I can do is create high damage slow projectile, a rapid rate low damaging projectile, increase/decrease length of radius.
But I'd like to add some more things and I would appreciate it if someone can help me with these.
projectile types I'd like to add:
- AOE( Area of effect damage)
- Bouncing damage
- Slowing
- Damage per second.
I'd appreciate every help!
Comments
build pong and ship it
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Just make a few separate actors. AOESpawner actor would be when collides with tag:enemies(or whatever) spawn actor AOE. In AOE rules just interpolate(this will change it's size to a larger square that gets bigger every so and so seconds) it's width and height to the desired length. Then in the enemies make a rule that says when collides with AOE :do: change attribute self.Life(or how you have it's life setup) :to: self.Life -desired damage. Bouncing I don't understand what you mean but it shouldn't be to hard. Then for slowing you'll want to add a self.Slow?(BOOLEAN) in the enemies. Then a rule in the enemy that says when collides with SLOWDOWNERBullet :do: change attribute self.Slow? :to: true. Then add another rule in the enemy that says if self.Slow? is true :do: timer:after:5 change attribute self.Slow? :to: false, & move at a slower speed :else: put your normal enemy movements in this else. THEN for damage per second you'll want to add another self.Hurtin'(BOOLEAN) and another rule that says if collides with HurtBullet :do: change attribute self.Hurtin' to true. Then another rule that says if self.Hurtin' is true :do: timer:every:0.5: change attribute self.Life -the desired number, & timer:after:5 change attribute self.Hurtin' to false. Phew. I hope it works
@jdlcrater I'm gonna all of these. Thanks for now mate hopefully it works out for me.
@zajinakajazz cool. I hope it works for you too