| 09-25-2004, 07:49 PM | #1 |
Well, heres one of the triggers for the duel system in my map, I want you to spot why dueling heros unit[2] isnt being set, because only duelingherosunit[1] moves and other triggers that dont work for dueling herosunit[2] so the problem is that duelingherosunit[2] isn't being set. Please help! EDIT: lo lsorry forgot to give you the trigger ^_^ Code:
Duel Accept
Events
Dialog - A dialog button is clicked for DuelDialogInvited
Conditions
(Clicked dialog button) Equal to DialogButtons[12]
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 2 (Blue)
Then - Actions
Set Playerblue = DuelingHeros[2]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 3 (Teal)
Then - Actions
Set PlayerTeal = DuelingHeros[2]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 4 (Purple)
Then - Actions
Set PlayerPurple = DuelingHeros[2]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 5 (Yellow)
Then - Actions
Set PlayerYellow = DuelingHeros[2]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 6 (Orange)
Then - Actions
Set PlayerOrange = DuelingHeros[2]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 8 (Pink)
Then - Actions
Set PlayerPink = DuelingHeros[2]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 9 (Gray)
Then - Actions
Set PlayerPink = DuelingHeros[2]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 10 (Light Blue)
Then - Actions
Set PlayerLightBlue = DuelingHeros[2]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 11 (Dark Green)
Then - Actions
Set PlayerDarkGreen = DuelingHeros[2]
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Triggering player) Equal to Player 12 (Brown)
Then - Actions
Set PlayerBrown = DuelingHeros[2]
Else - Actions
Do nothing
Hero - Disable experience gain for DuelingHeros[1]
Hero - Disable experience gain for DuelingHeros[2]
Game - Display to (All players) the text: ((Name of (Triggering player)) + has accepted the duel invitation)
Wait 2.00 seconds
Game - Display to (All players) the text: Feel free to watch ...
Cinematic - Ping minimap for (All players) at (Center of Duel Arena <gen>) for 5.00 seconds
Wait 3.00 seconds
Unit - Move DuelingHeros[1] instantly to (Center of Duel Hero 1 <gen>), facing (Center of (Playable map area))
Unit - Move DuelingHeros[2] instantly to (Center of Duel Hero 2 <gen>), facing (Center of (Playable map area))
Unit - Set life of DuelingHeros[1] to 100.00%
Unit - Set mana of DuelingHeros[1] to 100.00%
Unit - Set life of DuelingHeros[2] to 100.00%
Unit - Set mana of DuelingHeros[2] to 100.00%
Cinematic - Enable user control for (All players)
Cinematic - Enable user control for (All players)
Camera - Pan camera for (Owner of DuelingHeros[1]) to (Center of Duel Hero 1 <gen>) over 2.00 seconds
Camera - Pan camera for (Owner of DuelingHeros[2]) to (Center of Duel Hero 2 <gen>) over 2.00 seconds
Countdown Timer - Destroy (Last created timer window)
Cinematic - Enable user control for (All players)
Game - Display to (All players) the text: The duel starts now...
Trigger - Turn on Duel Hero 1 Dies <gen>
Trigger - Turn on Duel Hero 2 Dies <gen> |
| 09-25-2004, 08:18 PM | #2 |
Umm.. your IF statements are grotesque. But I'd say the bug is that you're setting the player equal to teh dueling hero instead of the dueling hero to the player... you never assigned DuelingHero[2] equal to anything. In other words, this: Set Playerblue = DuelingHeros[2] should be this: set DuelingHeroes[2] = Playerblue And repeat for everyone else... |
| 09-25-2004, 08:19 PM | #3 | |
Quote:
Why are all players set to DuelingHeroes[*2*]? Shouldn't they be either 1 or 2? |
| 09-25-2004, 08:26 PM | #4 | |
Quote:
I'd imagine DuelingHeroes[1] is set elsewhere--ie. when a person makes the challenge. I did notice that there's no functionality for Player 1 to accept a duel though. |
| 09-25-2004, 09:40 PM | #5 |
dueling hero 1 was set before, it is dueling hero 2 that doesn appear. But no, the set variables are right, when players choose hero their units are set as playerblue,playerpurple etc'. I know that works because I tried it with other options. But I think the problem is the condition's it isn't? |
| 09-25-2004, 09:56 PM | #6 | |
Quote:
*sigh* just believe me... Take this line of code that you have: Code:
Unit - Move DuelingHeros[2] instantly to (Center of Duel Hero 2 <gen>), facing (Center of (Playable map area)) You're trying to move DuelingHeros[2] to some point in the map. Now show me where you have DuelingHeros[2] = <something>? You don't! At least, not in what you showed me. It's undefined--it's nothing--it doesn't exist--it has no value. |
| 09-25-2004, 11:17 PM | #7 |
may it not face to playable map area?, and about setting duel hero 2 its in the if then else thing |
| 09-25-2004, 11:24 PM | #8 |
You didn't read a word he said did you... |
| 09-26-2004, 12:07 AM | #9 | |
Quote:
lol Do you feel my pain? I don't usually do this, but... Show me where you have DuelingHeros[2] = <something> The funny this is, you could just believe me and do what I said and then we wouldn't be having this discussion anymore. |
| 09-26-2004, 12:27 AM | #10 |
uhm isnt it rigth to set something to dueling hero 2? shoud I make it reverse? Playerblue unit and all that are the heros of the players, so I sahll do set dueling heros 2=playerblue(unit)? instead of set playerblue=duelingheros 2 eh? |
| 09-26-2004, 03:01 AM | #11 | |
Quote:
Allelujiah! This is what I was telling you to do ![]() |
