HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Triggers firing...

09-08-2003, 11:05 PM#1
Eriond
How do I get a certain trigger to fire first out of all the other triggers? My triggers both have different events that should occur at the same time, but one keeps on firing later, and I need that trigger to fire first.

The events from the trigger that fires first are:

Unit - Unit is issued an oreder targetting an object.

The one that fires second which I want to fire first has:

Hero - Hero Uses an Item

These triggers corresponde in the fact that the item is giving the order. How do I make it so that the Hero - Hero Uses an Item fires before the Unit - Unit is issued an order.

All help would be greatly appreciated, and I hope it gets fixed or else it will result in severe lag time in my RPG. 8))

Thanks in advance,
Eriond
09-08-2003, 11:12 PM#2
Zachary_Shadow
To me that sounds wierd... U want the ai to know that an issue is being given...it can't be done..

First the order

Then the item being maipulated..

If thoes are the ones u want to use, that is the only way they will be executed

IMHO!
09-08-2003, 11:23 PM#3
Eriond
Maybe I should've explained better. I'm not talking about AI, I'm talking about if a human player does this...

The triggers work exactly how they should work. All the actions fit into place perfectly. It's just that the Item one fires last. I need it to fire first. Any idea of how I could do that?
09-08-2003, 11:27 PM#4
Pesmerga
Move the trigger up in first place, so all the other triggers are below it.
09-08-2003, 11:27 PM#5
Zachary_Shadow
I can't see how the triggers should work...maybe with a bit more info it would be easier. And I didn't mean AI as in the computer playing ai, just as in AI (actuall computer, that fires the triggers)
09-08-2003, 11:40 PM#6
Eriond
It IS up in first place, but it still doesn't fire first... I think it has somehting to do with the events. Here's an example of the triggers I'm using to do my skills system (please don't steal the idea)

Events
Unit - A unit Uses an item

Actions
Set LastUsedItem[(Player number of (Owner of (Hero manipulating item)))] = (Item-type of (Item being manipulated))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
LastUsedItem[(Player number of (Owner of (Hero manipulating item)))] Equal to Pickaxe
LastUsedItem[(Player number of (Owner of (Hero manipulating item)))] Equal to Fly Fishing Rod
LastUsedItem[(Player number of (Owner of (Hero manipulating item)))] Equal to Fishing Rod
LastUsedItem[(Player number of (Owner of (Hero manipulating item)))] Equal to Hatchet
LastUsedItem[(Player number of (Owner of (Hero manipulating item)))] Equal to Tinder Box
LastUsedItem[(Player number of (Owner of (Hero manipulating item)))] Equal to Net
Then - Actions
Item - Remove (Item carried by (Hero manipulating item) of type LastUsedItem[(Player number of (Owner of (Hero manipulating item)))])
Hero - Create LastUsedItem[(Player number of (Owner of (Hero manipulating item)))] and give it to (Hero manipulating item)
Else - Actions
Do nothing

That was the one I want to fire first.

This one should come second.

Events
Unit - A unit Is issued an order targeting an object

Conditions
(Destructible-type of (Target destructible of issued order)) Equal to Rock Clay
((Ordered unit) is in (Units within 200.00 of (Position of (Target destructible of issued order)))) Equal to True


Actions

If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
LastUsedItem[(Player number of (Owner of (Ordered unit)))] Equal to Pickaxe
Then - Actions
Set Miningnumber = ((Random integer number between 1 and 10) - Mininglvl[(Player number of (Owner of (Ordered unit)))])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Miningnumber Less than or equal to 1
Then - Actions
Set Miningexp[(Player number of (Owner of (Ordered unit)))] = (Miningexp[(Player number of (Owner of (Ordered unit)))] + 10)
Game - Display to (Player group((Owner of (Ordered unit)))) for 5.00 seconds the text: You have obtained a...
Hero - Create Clay and give it to (Ordered unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 1 and 2) Equal to 1
Then - Actions
Game - Display to (Player group((Owner of (Ordered unit)))) for 5.00 seconds the text: You fail to make an...
Else - Actions
Game - Display to (Player group((Owner of (Ordered unit)))) for 5.00 seconds the text: You break off some ...
Else - Actions
Game - Display to (Player group((Owner of (Ordered unit)))) for 5.00 seconds the text: Nothing interesting...


Well anyway, that's what I want to happen second. Please help me? Otherwise I have to do It twice, and the affect lingers after until I use another item, which then clears the affect, but the item I just used has the same affect as the previous item.
09-08-2003, 11:42 PM#7
Guest
Autually the game doesn't execute them in order for some reason its still random... Your best bet is to add Wait For triggers and have each one trigger then next one.
09-09-2003, 12:04 AM#8
Zachary_Shadow
My best solution:

Disable the second trigger from the start, and make the first one activate it checking conditions, then turn it back off again when it reaches the bottom. That should work.
09-09-2003, 12:07 AM#9
Eriond
I've thought of that, Zacahry, but it won't work, cause there are event responses in the trigger, so if I diable it any way, it will still fire first, but all the conditions won't be fulfilled or it won't be turned on, so I'm back at square 1. Though I DO think that your idea, coolaboy is a good one. Thanks! I'll try it now.
09-09-2003, 12:11 AM#10
Guest
Yea i think that should work.
09-09-2003, 12:12 AM#11
Eriond
ERm emote_confused Where is the wait for trigger condicton/action/event?
09-09-2003, 12:13 AM#12
Guest
Its an action.. Its right next to Wait and Wait GameTime
09-09-2003, 12:16 AM#13
Eriond
Are you using a special editor or something? I'm using WE Unlimited.... it's not there...
09-09-2003, 01:07 AM#14
Guest
Wait until (((Triggering unit) is A structure) Equal to True), checking every 1.00 seconds


Its called Wait For Condition... I'm using TFT...
09-09-2003, 01:11 AM#15
Eriond
wait for condition. Never thought of that. Thanks. I guess I should get to it then! Thanks again.