I need a EUD condition that knows where a player clicked and one that knows if the player has selected a building. ty =)
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
First you need a general understanding of EUDs.
You need 1 trigger per pixel of mouse position you want to detect, and you can't detect mouse klicks, just key presses.
Also the building in question must not ever die in your map or you'll run into trouble with your selection detection.
Have you read the stickies?
http://www.staredit.net/163556/
An artist's depiction of an Extended Unit Death
I need a EUD condition that knows where a player clicked...
You need 1 trigger per pixel of mouse position you want to detect...
This alone says that what you are asking is going to be quite impractical to implement on a large scale. You may want to reconsider your methodologies for the map. What are you trying to do, exactly? There may be easier ways to implement the system, like via casting dark swarm and detecting that.
... one that knows if the player has selected a building.
Selection detection addresses can be found among other things in this thread:
http://www.staredit.net/topic/10471/6284E8 161889 P1 FIRST SELECTION ID (SHARED): (Pointer to unit, see below)
6284EC 161890 P1 SECOND SELECTION ID (SHARED): (Pointer to unit, see below)
...
628518 161901 P2 FIRST SELECTION ID (SHARED): (Pointer to unit, see below)
62851C 161902 P2 SECOND SELECTION ID (SHARED): (Pointer to unit, see below)
...
628548 161913 P3 FIRST SELECTION ID (SHARED): (Pointer to unit, see below)
62854C 161914 P3 SECOND SELECTION ID (SHARED): (Pointer to unit, see below)
... (for address: +0x30; for extended player: +12)
If it doesn't have to be global and will be client-side actions only, you may want to simply detect the unit portrait, because then you wouldn't need one trigger for each building, but rather one for each possible building type.
I need a EUD condition that knows where a player clicked and one that knows if the player has selected a building. ty =)
http://www.staredit.net/topic/6865/first map just has a trigger which detects what you have selected. Second map has selection and order. Have you watched the video and made an EUD health detection map? That's pretty much the first step in understanding SC memory and what EUDs really are.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.
Mouse click detection?
-We don't know where to directly detect the mouse click input in the memory.
-You can detect that a preplaced unit got an order (that's easy to detect)
Mouse on Map Detection:
-Singleplayer only, 16380 triggers to get mouse on map coordinates.
See attachement.
It's a text file (4.88mb) inside a rar-archive (55kb) containing the triggers + explanation text for Player 1.
Attachments:
Post has been edited 1 time(s), last time on Jan 5 2011, 6:58 pm by Ahli. Reason: corrected trigger count
I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.
Ahli, you sure you want to add, rather than set to, the deaths for the X-coordinate?
Set the screen offsets (X,Y) and add the mouse offset (X,Y) ?
Oh and I missed the 3. 16380 triggers are needed ;D
Mouse click detection?
-We don't know where to directly detect the mouse click input in the memory.
-You can detect that a preplaced unit got an order (that's easy to detect)
Mouse on Map Detection:
-Singleplayer only, 16380 triggers to get mouse on map coordinates.
See attachement.
It's a text file (4.88mb) inside a rar-archive (55kb) containing the triggers + explanation text for Player 1.
That's pretty pointless(srry) because it's single player only but can you explain why it's single player only?
None.
I order you to forgive yourself!
That's pretty pointless(srry) because it's single player only but can you explain why it's single player only?
For a detailed explanation, you can check other EUD threads, it was answered in almost all of them.... Let's just say it's because if it was multiplayer, anyone could easily hack in the game. (Using an external program to know what you are doing.)
An artist's depiction of an Extended Unit Death
It's single-player only because the address is client-side. Why is it client-side? Because each player has their own mouse with their own positions. There isn't an address for P1_Mouse_Position_X, P2_Mouse_Position_X, etc. Rather, there is one address for Mouse_Position_X and Mouse_Position_Y that holds the values for the client's mouse position. These values are going to be different because one player will have their mouse at a different position than another. When the trigger fires for one player, it runs for that player's instance of StarCraft, but since the other players do not have their mouse at the same spot, it won't run the trigger for them. This creates two different running games, one where the trigger fired, and one where it didn't. These two games will desync from each other, and the player that had the EUD trigger run will be dropped from the other game.
Reading address values that are shared will not have this problem, because the address value will be the same for all players, and nobody will be out-of-sync after it executes
(except Mac users *ahem*).
Just require your map to use the eud enabler mod on bnet.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
It's single-player only because the address is client-side. Why is it client-side? Because each player has their own mouse with their own positions. There isn't an address for P1_Mouse_Position_X, P2_Mouse_Position_X, etc. Rather, there is one address for Mouse_Position_X and Mouse_Position_Y that holds the values for the client's mouse position. These values are going to be different because one player will have their mouse at a different position than another. When the trigger fires for one player, it runs for that player's instance of StarCraft, but since the other players do not have their mouse at the same spot, it won't run the trigger for them. This creates two different running games, one where the trigger fired, and one where it didn't. These two games will desync from each other, and the player that had the EUD trigger run will be dropped from the other game.
Reading address values that are shared will not have this problem, because the address value will be the same for all players, and nobody will be out-of-sync after it executes (except Mac users *ahem*).
I knew a desync was gonna happen but I didn't know why. ty for explaining =)
None.