View Full Version : Ramming Unit
06-03-2011, 07:22 PM
One of the next units we're planning on releasing is the United Coalition Shark. The unit is practically ready apart from a little coding problem.
The secondary works using the same princible as the Japan Shogun Battleship. The only difference is that we want the unit to suffer a certain amount of damage when it strikes (whether this be a percentage or a value drop in HP doesn't matter).
No matter what we've tried the unit doesn't seem to lose any health. Any ideas?
06-05-2011, 03:07 PM
Since I'm assuming that you're using this block of code(same thing the Oni and Shogun Battleship use) use an attributemodifier to set a status.
Then have a LoseHealthUpdate like this
Now this -should- work, but I didn't test it out, so you'll have to say if it works or not, but in theory it should.
06-05-2011, 08:03 PM
I did think of something like this, but I have a feeling it will affect the unit on use of the power, not on impact of a unit.
06-05-2011, 08:33 PM
If it's targeted, it is almost forced to hit it, so as long as too many things are attacking something, it should work fine, but you do have a good point.
06-05-2011, 10:43 PM
Create a damage nugget (use different IDs if you have more than 1 DamageNugget) in the weapon template affecting the shark itself.
06-06-2011, 11:59 AM
I remember trying to give the Mammoth unit the ramming ability, but never got it to work... :/ Does the unit have to have a special 'running' animation or something before it can work?
I copy pasted the weapon and stuff and gave it a speed boost, but it never worked :S
Will give it a new shot now later this week...
06-10-2011, 08:21 AM
Forward from Open_Sketchbook since he can't login on this forum.
you could also make every unit explode with a damagetype that only hurts sharks
Powered by vBulletin® Version 4.1.10 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.