HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Selection System problem

10-24-2006, 09:08 PM#1
Zachary_Shadow
I have a problem with this Hero Selection system I'm trying to implement into my AoS. I still have lots of things I want to modify, but thoes will come later. If anyone would be willing to help me modify it for my map, I would be very grateful :)

The problem I'm facing right now, is that when the game starts, the system is supposed to change the facing of the cam, and show the first hero. Instead, it shows the X that is supposed to appear when a hero is selected, at the center of the map. Although it DOES work, if I press the left or right arrow key as it is supposed to, but to me it seems like it has created this X as a part of the heroes...

Can anyone tell me what is wrong with the trigger here? I this is not my creation, I'm only modifying it for my own purpose (with permision of course, a loooong time ago :)) I'm attaching the original map, but that also has a problem with the X appearing, even though the characters haven't been selected.

Any help appreciated
This Hero Selection trigger was made by Magos

Here is the one I'm having trouble with:
Trigger:
SwitchHero
Events
Conditions
Collapse Actions
-------- Removes the old Hero and SFX --------
Special Effect - Destroy Selection_SFX[TempInteger]
Unit - Remove Selection_Hero[TempInteger] from the game
-------- Creates a new Hero and SFX --------
Unit - Create 1 Selection_HeroType[Selection_CurrentHero[TempInteger]] for Neutral Passive at (Center of Selection_HeroRegion[TempInteger]) facing 240.00 degrees
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Picked[TempInteger] Equal to Selection_CurrentHero[TempInteger]
Collapse Then - Actions
Floating Text - Create floating text that reads X at (Position of Selection_Hero[TempInteger]) with Z offset 0.00, using font size 60.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Collapse Else - Actions
Do nothing
Unit - Make (Last created unit) Invulnerable
Set Selection_Hero[TempInteger] = (Last created unit)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
Selection_FirstHeroSelection Equal to False
Collapse Then - Actions
Special Effect - Create a special effect attached to the origo of Selection_Hero[TempInteger] using Abilities\Spells\Items\AIam\AIamTarget.mdl
Set Selection_SFX[TempInteger] = (Last created special effect)
Else - Actions
-------- Resets the camera at each selection in case the user touched the mouse wheel (the zoom) --------
Camera - Pan camera for TempPlayer to (Position of Selection_Hero[TempInteger]) over 0.00 seconds
Camera - Set TempPlayer's camera Distance to target to 500.00 over 0.00 seconds
Camera - Set TempPlayer's camera Angle of attack to -25.00 over 0.00 seconds
Camera - Set TempPlayer's camera Rotation to 90.00 over 0.00 seconds
Camera - Lock camera target for TempPlayer to Selection_Hero[TempInteger], offset by (0.00, 0.00) using Default rotation
-------- Automatically selects the Hero so the Player can see his stats --------
Selection - Select Selection_Hero[TempInteger] for TempPlayer
-------- Displays the Hero stats for the player selecting it --------
-------- (Don't add or remove any fields, or you may experience ugly interface text bugs) --------
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: Press the |c00f59a6...
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: Press the |c00f59a6...
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text:
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: (Name: |c0051a8ff + ((Name of Selection_Hero[TempInteger]) + |r))
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: (Health: |c0051a8ff + ((String((Max life of Selection_Hero[TempInteger]), 0, 0)) + |r))
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: (Mana: |c0051a8ff + ((String((Max mana of Selection_Hero[TempInteger]), 0, 0)) + |r))
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: (Speed: |c0051a8ff + ((String((Default movement speed of Selection_Hero[TempInteger]), 0, 0)) + |r))
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: (Attribute: |c0051a8ff + (Selection_PrimaryAttribute[Selection_CurrentHero[TempInteger]] + |r))
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text:
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: Abilities:
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: (|c00a8ffa8 + (Selection_Ability1[Selection_CurrentHero[TempInteger]] + |r))
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: (|c00a8ffa8 + (Selection_Ability2[Selection_CurrentHero[TempInteger]] + |r))
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: (|c00a8ffa8 + (Selection_Ability3[Selection_CurrentHero[TempInteger]] + |r))
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: (|c00a8ffa8 + (Selection_Ability4[Selection_CurrentHero[TempInteger]] + |r))
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text: (|c00a8ffa8 + (Selection_Ability5[Selection_CurrentHero[TempInteger]] + |r))
Game - Display to (Player group(TempPlayer)) for 3600.00 seconds the text:


Cheers!

EDIT: Here's the map I'm copying the triggers and variables from...
Attached Files
File type: w3xSelectionTest.w3x (26.2 KB)
10-25-2006, 09:39 AM#2
shadowange1
Maybe you should attach the map with the trigger cause i don't understand what is meant by the X appearing. attaching the map would also make it easier to see whats wrong with it because then exactly whats wrong with it can be seen.
10-25-2006, 09:59 AM#3
Zachary_Shadow
Deffinatly, I'll do that later tonight when I get off work.

Edit: The point of the X is to tell people if a character is already picked or not, however it doesn't work properly... The map I'm using it in, is different from the test map, but shouldn't really pose a problem, as it SHOULD be easy enough to implement... If someone out there would like to help me expand this great selection system, please, let me know :) I'll get the map up around 7 or 8pm GMT+1.