FlexFellovic : Thank you but I'm really ill with hachtables :s
I tried to understand those but I.. I just can't xD.
Legal Ease :
Unit - A unit Is issued an order targeting an object --> Does it work on a destructible?
((Target unit of issued order) is in ClosedChests) Equal to True --> Does it refer to a region?
I want to thank you guys because thanks to you I have a better idea about how I can create a loot table, because yesterday I was stuck on this.
You gave me an idea about how to use custom value of an object, this is smart!
So if I understand you trigger, you just have to right click on the chest and it will give you random objects? (if it's
x<50 you have Gold coins and a heal pot and if it's
50<x<90 you obtain a lv 7 misc item, and you get nothing if it's
x>90 right?)
Because in the game i'm creating a system where you can interact with
destructible, units and doodads with a competence (or skill if you prefer) which is named "action".
And there is a chest room where each player can only open
1 chest per game. I created a trigger yesterday but I don't know if i'm doing right. There are 10 players and I did only for two players, but I find my trigger too heavy for two players, so imagine for 10
. See by yourself ^^ (sorry my GUI is in french, but it's understandable
)
-
Activate coffre (chest) 1
-
Evénements
-
Unit - A unit Initie l'effet d'une compétence (uses a competence/skill)
-
Conditions
-
(Ability being cast) Egal à Action
-
(Coffre Blinde 1 <gen> contains (Triggering unit)) Egal à TRUE
-
Actions
-
Set FirstOpener = (Triggering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
Alors - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
(Unit-type of FirstOpener) Egal à* Prisonnier
-
(Owner of FirstOpener) Egal à* Joueur 1 (Rouge)
-
Alors - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
RedChestAlreadyOpened Egal à* FALSE
-
FirstChestAlreadyOpened Egal à* FALSE
-
Alors - Actions
-
Trigger - Turn off (This trigger)
-
Set RedChestAlreadyOpened = TRUE
-
Set FirstChestAlreadyOpened = TRUE
-
Destructible - Kill Coffre blindé (the chest) 1029 <gen>
-
Animation - Play Coffre blindé (the chest) 1029 <gen>'s morph animation
-
Destructible - Kill Levier spécial 1030 <gen>
-
Animation - Play Levier spécial <gen>'s morph animation
-
Sinon - Actions
-
Sinon - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
(Unit-type of FirstOpener) Egal à* Prisonnier
-
(Owner of FirstOpener) Egal à* Joueur 2 (Bleu)
-
Alors - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
BlueChestAlreadyOpened Egal à* FALSE
-
FirstChestAlreadyOpened Egal à* FALSE
-
Alors - Actions
-
Trigger - Turn off (This trigger)
-
Set BlueChestAlreadyOpened = TRUE
-
Set FirstChestAlreadyOpened = TRUE
-
Destructible - Kill Coffre blindé (the chest) 1029 <gen>
-
Animation - Play Coffre blindé (the chest) 1029 <gen>'s morph animation
-
Destructible - Kill Levier spécial 1030 <gen>
-
Animation - Play Levier spécial 1030 <gen>'s morph animation
-
Sinon - Actions
-
Sinon - Actions
-
Sinon - Actions
Do not mind about the variable "YouCanOpen", because before opening the chests, you have to do something before (a kind of enigma ^^)
"FirstChestAlreadyOpened" refers to the first chest of the room chest, there are a total of 11 chests.
"RedChestAlreadyOpened" and "BlueChestAlreadyOpened" will check if you have already opened a chest before, if it's true, you can't open any chest anymore. If it's false, you can.