Need help with troop event

varchild4

Veteran
Veteran
Joined
Nov 13, 2015
Messages
30
Reaction score
3
First Language
Francais
Primarily Uses
I stopped developping this game for one year so i have to make a new post now that i have time to continue. You can see the original post there but I will resume some interventions here too. 




Using Hime's "Tag Manager" makes this Big bird's ability to damage only "insects" but doesn't prevent it from attaking itself (even if it do zero damage.)

Andar said: 


you'll either need to abandoning the attack pattern and use a scripted substitute for targeting, or you'll have to think a bit "out of the box".


You cannot have one skill that attacks both allies and enemies by default engine. So what I would do is to split this into two skills and use the attack pattern for switching between the skills. I haven't tested the following, so it might cause the enemy to attack itself once - but after that it should switch the targeting:


1) make a skill to attack its allies only, give it a high rate (>10) and a condition of a switch "ally alive"


2) make a skill to attack the enemy (player) and give it a low rate (<8) and no condition


3) make a troop event that counts the number of alive allies at all times and switches on if there is an ally alive and off if not


The troop event (3) has to be started before the first action or the switch has to be activate before battle to have the bird attack its allies from the beginning.


Depending on when the last ally dies, the switch may be off in time for the first attack after that, or it may need an additional turn to register the condition change - I can't tell that without testing." 


Problemes i encouter with Andar's suggestion:  


a- if put the troop condition frequency to "always", the battle jammes rightaway, even if i add a wait command or put turn condition to 0+1*x turns. 


b- As Andar was expecting, the Bird attack itself once before attacking your team (once all it's inssects allies are dead). It also attack your team once before attacking it's insects allies at start of battle (with condition ajusted to 0+1*x turns and frequecny to "each turns".. see the screenshot below)


a
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
The simple answer is to use Hime's Scope Conditions script.  Have your scope condition check the target's ID to make sure it is an insect (or, alternatively, check that it is not the bird himself).


The above should give you a better result.  The bird will never attack himself.  The animation will never play.  However, I think it's possible (not sure) that he will still try to use the "Eat" skill sometimes, and it will simply do nothing since there are no valid targets.  If you want to make sure this never happens, it will take some intermediate-to-high level eventing.  You can run a Troop event at the end of each turn which determines whether any insects are alive - and if there are any insects alive, you set a Switch to ON and mark one of the alive insects, at random, with a dummy state that does nothing called "Eat Target" or whatever (this is easier said than done if you're not good at Eventing, so if that's the case just forget this and use the simple solution above).  Now, make the bird's "Eat" action require that the Switch is ON, and give that action the scope condition of the target needs to have the "Eat Target" state applied.  If necessary (not sure whether it is or not), change the skill's scope to "All Allies" to make sure this insect gets targeted.  Finally, add Troop events with scope "Moment" that trigger when each Insect dies; these troop events should look to see if any insects are still alive with the "Eat Target" state applied, and if there are none left, should turn the aforementioned Switch OFF.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top