| 11-04-2003, 04:10 PM | #1 |
I need skill like pillage. But pillage use this: When you hit building you will get some percents of cost of that building. But I need to get as gold as I do damage to building. example: When I hit building for 25 damage. I need to get 25 gold. |
| 11-04-2003, 05:15 PM | #2 |
im not sure of the exact aspects of that ability but i no the triggering u could use. building X is attacked attacking unit is unit X Unit X has ability X give 25 gold to player X uh...i like x's, dont judge....:ggani: |
| 11-04-2003, 05:36 PM | #3 |
try this... event: unit is attacked condition: attacking unit has pillage(yours) action: add (amount of damage) gold to owner(attacking unit) I am at work so I will check the editor in a bit... I am pretty sure what I just said won't work... lol |
| 11-04-2003, 05:48 PM | #4 |
First you will need to add any created units with your ability to a unitgroup "pillage" event: Unit is attacked condition: attacked unit is a structure = true attacking unit is in pillage = true action: add xx to current gold of (owner of attacking unit) the problem comes with registering how much damage was done... if you have very few buildings this is easily done, but if you have a ton it will be a hastle to keep a variable for every building's hitpoints... IF someone knows of a way to fidn the damage done by an attacking unit, just insert that where I have xx... sorry I couldn't help you all the way |
| 11-04-2003, 05:53 PM | #5 |
give that unit a fixed damage like 20-20 and a 20 gold/lumber pillage...:) |
| 11-04-2003, 09:03 PM | #6 |
Integer or real, I can't remember, but the value is Event Response - Damage Taken or Damage Dealt I cant remember. But use that. |
| 11-04-2003, 09:14 PM | #7 |
This requires some knowledge of the editor... but is actually really quite easy, just two triggers. Code:
Pillage Fake
Events
Conditions
(Unit-type of (Attacking unit)) Equal to Peon
Actions
Player - Add (Integer((Damage taken))) to (Owner of (Attacking unit)) Current goldThe second trigger. Code:
Pillagable Buildings Preplaced
Events
Time - Elapsed game time is 0.01 seconds
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A structure) Equal to True)) and do (Actions)
Loop - Actions
Trigger - Add to Pillage Fake <gen> the event (Unit - (Picked unit) Takes damage)And prehaps a 3rd trigger. Code:
Pillagable Buildings New built
Events
Unit - A unit Finishes construction
Conditions
Actions
Trigger - Add to Pillage Fake <gen> the event (Unit - (Constructed structure) Takes damage) |
| 11-04-2003, 10:33 PM | #8 |
ok yeah I found it. If you use the 3rd trigger grater said then you don't need the second one. except as an initial thing to add preplaced structures to that group |
| 11-05-2003, 04:42 PM | #9 |
Thanks. I will try these methods. |
