You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Yeebaagooon, TAG

Hop to:    
Welcome! You are not logged in. Please Login or Register.7 replies
Age of Mythology Heaven » Forums » Scenario Design » (Trigger Question) Every time a certain type of unit dies grant resources
Bottom
Topic Subject:(Trigger Question) Every time a certain type of unit dies grant resources
Adjudika12
Mortal
posted 30 December 2018 04:51 PM EDT (US)         
Hello everyone. I am working on a very complex RPG map with unique systems. I've seen that most of the maps use an exp sytem based on the killcount stat, which leads to granting the main character similar exp amounts regardless of the difficulty or the power of the enemy.

In my scenario I'm working on a system that actually gives exp points based on the creature killed, just like any real RPG game.

Since it will take forever to make a specific trigger for every single unit, I am figuring out a way to do it with the "is dead by name" trigger. However it always results on loops. Let me detail it a little bit more.

I have 3 triggers for each type of unit, ex:

Trigger High Priority
Cond: Is dead by name (Spearman)
Effect: Grant 1 wood, send player message, fire random event (which sometimes grants gold and sometimes don't) and finally a fire event that triggers back this trigger.

The problem is that the condition does NOT reset, that means that when a single Spearman is killed the trigger just loops and keeps granting wood ad infinitum.

żDoes any one know of a condition that allows me to resolve the other triggers EVERY time a certain kind of unit dies?

I'd really appreciate any help or ideas!
AuthorReplies:
WinterGod
Mortal
posted 30 December 2018 09:57 PM EDT (US)     1 / 7       
Try to use Fire event to that trigger. Grant resources shouldn't loop, and remain inactive.
Adjudika12
Mortal
posted 30 December 2018 10:16 PM EDT (US)     2 / 7       
My problem is not triggering back the effect. The problem is that with the conditional "is dead by name" if a single Spearman is killed, the condition is fulfilled and it fires the effects. Then, the trigger is inactive, but when I use another trigger to activae it again, the condition does not reset so it keeps resolving again and again even though there is only 1 spearman (or any creature I type) killed.

I'm trying to figure out a way so the condition resets every time so it takes every unit killed as a separate event instead of triggering with a single kill of that unit.

I'm not sure if I'm making myself clear, sorry xD
WinterGod
Mortal
posted 31 December 2018 01:26 AM EDT (US)     3 / 7       
Use one fire event to activate the bonus. Then use fire event a third trigger, disable the second trigger. My memory is a little hazy, but it was something like that.
Adjudika12
Mortal
posted 31 December 2018 01:52 AM EDT (US)     4 / 7       
Is the same

The main problem is that the condition "is dead by name" does not reset and it is enough to have 1 unit die for it to be fulfilled the whole scenario.

There is nothing to do about it except doing a single trigger for each unit so they gran different amounts of wood
WinterGod
Mortal
posted 31 December 2018 02:17 AM EDT (US)     5 / 7       
I created what you are saying with army deploy and its working.

There is a looping trigger with a timer. Every six seconds it activates the inactive tribute trigger, which has a condition of army dead. Mine is working fine, but I don't have that "is dead by name trigger".

Try, exactly what I did here.
scragins
Heretic of December
posted 31 December 2018 08:12 PM EDT (US)     6 / 7       
i recommend using unit killed cost instead of unit killed count. The cost of the unit essentially becomes the XP it grants when killed. You can then change cost of units to change the XP they grant when killed.
Adjudika12
Mortal
posted 01 January 2019 03:33 PM EDT (US)     7 / 7       
THX!!!!! The grant resource per unit killed cost is the solution!

You saved my ass, expect a very very fun and well made rpg map soon
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Mythology Heaven | HeavenGames