Uncontrollable units damge doesnt count

A forum for discussing map making ideas and problems for the Myth series.
SamualACarver
Posts: 83
Joined: Thu Dec 13, 2007 10:08 am

Re: Uncontrollable units damge doesnt count

Post by SamualACarver »

Again thanks Pyro for all the help. I would have probably spent 2 more weeks to get this far if I didnt have your help.

I was wondering if you or anyone could tell me if this part of my Script is working like I think it is. I am getting the results I want (I think) but I am not sure if it is for the right reasons.

What I have done so far is have the "Exp count" going like you showed me. That is working good. The first "Exp count" ends after the "Training" period. (A new one starts after training.) There are only Dogs left when the "Training" is over. This way the next kill a Dog makes means it is another dog they killed. I used the idea that you suggested where I have 8 unique dogs that all drop a unique object at death.

Basically what happens is. After "Training" the first "vet count" stops. That locks in the Exp number that the dog gained during "Training" in an "Exp >" TUNI. When that dog kills another that TUNI succeeds, which starts a GEOM that looks for the Unique Object the dead dog dropped. That starts a CTRL that (for now) kills the Jman "Trainer" on the dead dogs team. At this point I have another "Exp count" to continue so if that dog kills another dog it will start the Geom again. I have that done but, I am not sure if after the first dog it kills ,the GEOM stops. When it kills its second dog the Geom does find the "Unique Object" and kills that dog's "Trainer". Which is what I want but, I'm not sure if it the GEOM staying active after the first kill or if it is being restarted by the "Vet count" like it should. I have the Geoms (2 right now) to Expire on Execution, which if I understand how that works exactly, that GEOM should only do one Test and then need to be started again to do another GEOM test. Is that right?

Hopefully I was able to explain this well. I get confused trying to keep it all straight. I have this part of the script can you tell me if the Geom is being reset and starting again, or is it being started and staying active?

Thanks Sam

Start Dog Kill Count a [Test Unit]
only_initial_delay
deactivates_on_successful_execution
1.00, 1.00
{
Monsters
10656 (wolf special T0)
Experience Greater Than
0
Activates on Success
T1 Dog Dead?
VCa Fight T0
T2 Dog Dead?
}

VCa Fight T0 [Mathematics]
deactivates_on_successful_execution
0.00, 0.00
{
Left Action Identifier
Start Dog Kill Count a
Left Field Name
exp>
Right Integer
5
Add
true
Destination Action Identifier
Start Dog Kill Count a
Destination Field Name
exp>
Activates on Execution
Start Dog Kill Count a
}

T1 Dog Dead? [Geometry Filter]
deactivates_on_execution
0.00, 0.00
{
Object Type
wabv
Circle Centerpoint (Monster)
10656 (wolf special T0)
Circle Radius
3.001
Minimum Number of Items
1
Activates on Success
W0 P W1
Results Action Identifier
W0 P W1
Tested items Inside Field Name
obje
Minimum Number of Items
1
}

W0 P W1 [Pick Up Object]
deactivates_on_successful_execution
0.00, 0.00
{
Object
Link
Wolf 0
Activates on Activation
Kill T 1 Jman
}

Kill T 1 Jman [Unit Control]
deactivates_on_trigger
0.00, 0.00
{
Monsters
10640 (journeyman DOG FIGHTS Player)
Kill Monsters
0
}

T2 Dog Dead? [Geometry Filter]
deactivates_on_execution
0.00, 0.00
{
Object Type
wabw
Circle Centerpoint (Monster)
10656 (wolf special T0)
Circle Radius
3.001
Minimum Number of Items
1
Activates on Success
W0 P W2
Results Action Identifier
W0 P W2
Tested items Inside Field Name
obje
Minimum Number of Items
1
}

W0 P W2 [Pick Up Object]
deactivates_on_successful_execution
0.00, 0.00
{
Object
Link
Wolf 0
Activates on Activation
Kill T 2 Jman
}

Kill T 2 Jman [Unit Control]
deactivates_on_trigger
0.00, 0.00
{
Monsters
10641 (journeyman DOG FIGHTS Player)
Kill Monsters
0
}
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Re: Uncontrollable units damge doesnt count

Post by Pyro »

Yes, I understood what you said. You are obviously getting the hang of scripting. To answer your main question, yes it looks like you set the script up correctly to have the GEOMs run a single test each time the TUNI detected an increase of experience. The rest of this post is just a bit of extra information and tips.

I see you have two "Minimum Number of Items" parameters for each GEOM. I don't think that will cause any issues but just to be safe you should take one off. You could even get rid of both as you only wanted 1 result. That parameter is there for situations were you want, for example, to only succeed when you find 4 (or any number above 1) results and nothing lower than that.

However, if you want the results to only be one and no more, use the Maximum Number of Items parameter set to 1. You would only need to do this is if there is a chance there will be more than one projectile found by the GEOM. The PickUp action will not be able to give 2 projectiles at the same time, but I don't think you have more than one enemy dog fighting so that shouldn't be an issue.

I noticed you have your MATH action set to deactivate on success. You can leave it like that however for future Math actions it might be best to use "on execution" or anything that doesnt depend on success or failure. Currently if the result of a Math action is a zero, it will think it failed eventhough the math was correct. When the result is a one, it will think it succeeded even if the math shows it should not have. There are situations where you want to simply see if a Math action succeeds like if you wanted to know if two numbers are equal. But if you are simply altering a value by adding, subtracting, multiplying, etc try not to set the expiration or use parameters that depend on succeeding and failing.

The unique projectile created by the dogs could cause you issues if it can be affected by the power of the attack that killed the dog. I doubt you have this issue, but if you noticed the script is not acting like it should it could be because it could not detect the projectile within the radius. If the projectile is set to fall straight to the ground have no random velocity in the projectile tag, you should be fine. For example, if instead of dogs you used dwarves, you could see this issue. When you blow up a dwarf you see its remains scatter due to the power of the attack that killed that unit. So in that case, the projectile could fall out of bounds in a test.
Post Reply