HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to implement new weapon/armor types?

07-25-2003, 10:53 PM#1
MiCroSlave
Does anyone have any ideas on this? What I would ideally like to do is squeeze 2-3 more weapon/armor types into the game. I need the original ones, however:(.

I tried to use the two unused ones (When you edit a units armor/wpn, there are two unused types), but you can't edit those types, and I think they default to some other type.

I tried to use a trigger:
Event:
Unit is Attacked

Condtions:
Attacking Unit belongs to UnitClass A (Did this with a big Or)
Attacked Unit belongs to UnitClass B (Again, a big Or)

Action:
Set Attacked Unit's Current Life to Attacked Unit's Current Life - 100.

Problem with this, is it looks really phony. It doesn't actually wait until the unit is attacked "phyiscally". Meaning, if you attack with a ballista, a unit that is at the ballista's maximum range, the attacked unit looses the 100 life instantly, and then once the projectile hits the unit, it looses the hitpoints from the original attack.

This method also doesn't work with Evade/Curse etc. If the attacking unit misses, the target still looses a 100 hitpoints.

Anyone have some other ideas?
07-25-2003, 11:38 PM#2
ViruZ
hmmm this may be siple as pie? but anyways.. time the unit attack and see when it stikes.. then just put a wait trigger befor the trigger that does the damage with the estimated time when the unit "hits" its enemy. i think that is pritty simple enuf?
07-26-2003, 12:43 AM#3
MiCroSlave
Yea, I tried that.

Main problem with that is, I don't want to have a seperate trigger for each unit type that is attacking.

That also doesn't solve the problem if the ballasita is next to the unit.

I tried another thing by setting a variable to the attacked unit's current hp, and then using the wait for condition (as an action), to wait until the current hp of attacked unit is less than the variable (Which represents its original hp, before the projectile hits).

Problem with this, is if the projectile doesn't hit (miss/evade), then all of a sudden it is adding multiple 100 points of damage to a succesful hit.
07-26-2003, 12:57 AM#4
ViruZ
hmm...