For my Plants Vs. Zombies map I am working on I used a bloated siege tank as the lawnmowers. I need to know how to make it so that when the lawnmower rolls over the zombies they die. How can I make it so that the lawnmowers kill units they collide with?
Create effect (damage) that will kill zombies (deal lots of damage or add Kill flag).
Then make effect (search area), and modify it's filters (so it will only kill zombies) scan radius and range(reach only in front, about 100-180 degrees), add previous effect to it so it will kill anything it finds.
Make custom behavior (persistent), and set it's period to 0.01, add search area effect as periodic effect.
Add behavior to tank.
Can't check up in the editor atm but I think I didn't miss anything.
LOL I tested it and all the tanks blew up at map init. They were set to invulnerable and I set the filters to exclude ally, neutral and player. wtf just happened. I didnt even use the kill flag.. i set the damage really high.
Sounds like your behavior is being applied to the tanks themselves. I have an issue with one of my spells that has an AoE where if I cast it at a certain angle it applies the behavior to the caster as well as the target area. If I figure that out, I'll let you know what I find.
Are you using search area effect or added damage directly? I couldn't get damage to work without search effect, you have any problems in setting it up like that?
I need to know if I can just edit the search area fields for the (damage) effect or do I have to create a whole new effect for the search? I just edited the search area for the damage.
For an example to look for. open a map with campaign dependencies and look for the collision behavior on SS_Carrier (the carrier boss in lost viking map) or any other boss
okay ill check it all out. I will also check out what uias did. I opened it and some things were in another language so I will do my best. thanks for all the replies.
Assuming "Show Table View" button is OFF so you see GUI widgets instead of a table.
1. [Kill Effect] Create a new effect with Effect Type: "CEffectDamage"
On the right panel with the effect selected, go to Effects tab, look at CEffectDamage_Flags section and checkmark "e_damageFlagKill"
Go to the Search tab, scroll down to find the CEffectEnumArea_SearchFilters list and double click e_targetFilterSelf to set it to "Excluded". Uncheckmark the Ally and Player boxes.
2. [Search Effect] Create another new effect with Effect Type: "CEffectEnumArea"
On the right panel with the effect selected, go to Search tab, look at CEffectEnumArea_AreaArray section and click the green X icon, a new search area is created; set its Arc as "360" (kill touching units from all directions) and in Effect select the effect you created in step 1. Set the radius to your desire.
Still on the Search tab and same as the previous effect, scroll down to find the CEffectEnumArea_SearchFilters list and double click e_targetFilterSelf to set it to "Excluded". Uncheckmark the Ally and Player boxes.
3. [Behavior] Create a new behavior with Behavior Type: "CBehaviorBuff".
On the right panel with the behavior selected, go to Stats tab, scroll down to find CBehaviorBuff_Period and set it to "0.01" (checks for units near the buffed unit every 0.01 seconds). Go to the Effects tab and under "CBehaviorBuff_PeriodicEffect" select the search effect you created in step 2.
4. To add the behavior to a unit in the Data Editor, select the unit then on the right panel go the Behavior tab. Under the section CUnit_BehaviorArray click the green X button, change the newly added behavior to the behavior you created in step 3.
To add the behavior dynamically with triggers, use the action "Add Behavior (Player)". Remember to set the casting player as the owner of the unit or else the search effect will detect your unit as an enemy and kill it.
For my Plants Vs. Zombies map I am working on I used a bloated siege tank as the lawnmowers. I need to know how to make it so that when the lawnmower rolls over the zombies they die. How can I make it so that the lawnmowers kill units they collide with?
Miscellaneous Map Development is the wrong forum for this, moved to Data.
@Twinmold20: Go
yeah i had no idea where this would go because i wasn't sure if this was data or triggers sort of thing..
@KillerGymSox: Go
Can't check up in the editor atm but I think I didn't miss anything.
persistent behavior? do you mean persistent effect? There is no persistent behavior.. im confused.
@KillerGymSox: Go
Use a normal Buff Behavior for it.
Also set it's flags to "Hidden" so you can't see it.
Everything else: Do as uias said.
@s3rius: Go
The behavior that has period is called "buff"? It's been bugging me for a while as I don't have english editor.
Also, I think u could skip the search area effect, modify the damage effect to have an area and add it directly to the behavior.
@s3rius: Go
how do i add an effect to an effect? "add previous effect to it so it will kill anything it finds. "
edit: oh you said I don't need the search effect if i edit the search fields for the damage correct?
LOL I tested it and all the tanks blew up at map init. They were set to invulnerable and I set the filters to exclude ally, neutral and player. wtf just happened. I didnt even use the kill flag.. i set the damage really high.
@KillerGymSox: Go
Set filters to exclude Self. Check map i made for references, actually ended up using search areas.
@KillerGymSox: Go
Sounds like your behavior is being applied to the tanks themselves. I have an issue with one of my spells that has an AoE where if I cast it at a certain angle it applies the behavior to the caster as well as the target area. If I figure that out, I'll let you know what I find.
yeah i excluded self and it still did it.
Are you using search area effect or added damage directly? I couldn't get damage to work without search effect, you have any problems in setting it up like that?
@uiasdnmb: Go
I need to know if I can just edit the search area fields for the (damage) effect or do I have to create a whole new effect for the search? I just edited the search area for the damage.
For an example to look for. open a map with campaign dependencies and look for the collision behavior on SS_Carrier (the carrier boss in lost viking map) or any other boss
@progammer: Go
okay ill check it all out. I will also check out what uias did. I opened it and some things were in another language so I will do my best. thanks for all the replies.
Why not create a weapon that can fire whenever it's moving (use a turret with a short arc), but make its range melee?
@uiasdnmb: Go
uiasdnmb's method works.
Assuming "Show Table View" button is OFF so you see GUI widgets instead of a table.
1. [Kill Effect] Create a new effect with Effect Type: "CEffectDamage"
On the right panel with the effect selected, go to Effects tab, look at CEffectDamage_Flags section and checkmark "e_damageFlagKill"
Go to the Search tab, scroll down to find the CEffectEnumArea_SearchFilters list and double click e_targetFilterSelf to set it to "Excluded". Uncheckmark the Ally and Player boxes.
2. [Search Effect] Create another new effect with Effect Type: "CEffectEnumArea"
On the right panel with the effect selected, go to Search tab, look at CEffectEnumArea_AreaArray section and click the green X icon, a new search area is created; set its Arc as "360" (kill touching units from all directions) and in Effect select the effect you created in step 1. Set the radius to your desire.
Still on the Search tab and same as the previous effect, scroll down to find the CEffectEnumArea_SearchFilters list and double click e_targetFilterSelf to set it to "Excluded". Uncheckmark the Ally and Player boxes.
3. [Behavior] Create a new behavior with Behavior Type: "CBehaviorBuff".
On the right panel with the behavior selected, go to Stats tab, scroll down to find CBehaviorBuff_Period and set it to "0.01" (checks for units near the buffed unit every 0.01 seconds). Go to the Effects tab and under "CBehaviorBuff_PeriodicEffect" select the search effect you created in step 2.
4. To add the behavior to a unit in the Data Editor, select the unit then on the right panel go the Behavior tab. Under the section CUnit_BehaviorArray click the green X button, change the newly added behavior to the behavior you created in step 3.
To add the behavior dynamically with triggers, use the action "Add Behavior (Player)". Remember to set the casting player as the owner of the unit or else the search effect will detect your unit as an enemy and kill it.
@Alphadrant: Go
EXTREME NECRO
@Alphadrant: Go
Thanks, helped a lot. :]