EDIT: Wrong section, sorry. Could a mod move this to Mapmaking assistance please?
Allow me to explain.
Let's say that the player currently has Unit X selected. However, I want to remove unit X, and, at the same location, create Unit Y. Normally, doing this would result in the unit being deselected.
When Unit X is removed, I want Unit Y to be
automatically selected, without requiring the player to select it himself. Ideally, it would also be only triggered if the player currently has Unit X selected.
I am using Farty's EUD Action Enabler.
Thanks in advance!
None.
I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.
That would only work if the "new" unit is preplaced, I guess.
Because I don't think that replacing the unitID in the unit array would update the graphics.
But atm I'm not that sure how much you would have to write into the RAM. Maybe only some sort of unit array index.
An artist's depiction of an Extended Unit Death
That would only work if the "new" unit is preplaced, I guess.
Yup.
6284E8 161889 P1 FIRST SELECTION ID (SHARED): (Pointer to unit, see below)
6284EC 161890 P1 SECOND SELECTION ID (SHARED): (Pointer to unit, see below)
...
Pointer to Units (x = unit index):
if x = 0: 5885096
if x >= 1: 6455960 - 336(x-1)
Info from
http://www.staredit.net/topic/10471/
this doesn't make sense. I don't think this will work. It's pretty stupid for starcraft to use a shared value to select stuff. It's more likely that the non-shared current select unit value sets the shared current select unit value. I'd do that one, wherever it is (doodle77 made a map demonstrating the non-shared value). The only problem is you'll have to make it a non-shared trigger.
I haven't experimented with it, but can't you change the unit how you want? Why do you need a new unit?
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
It's designed so that when a unit moves to a location, their "weapon" gets switched (by replacing the unit with another).
I could change the existing unit though. It would probably be much smoother actually.
I know it's possible to change the weapon that a unit is using through an EUD action; what, exactly, would I need to do to change the weapon of a unit into a specific weapons.dat ID? Keep in mind that the map I'm using this for is single-player, so there's only P1 involved.
None.
Do you even need EUD action enabler if it's single player. I mean you can't desync being alone.
None.
Do you even need EUD action enabler if it's single player. I mean you can't desync being alone.
I believe that running EUD actions, singleplayer or not, will simply not do anything,
unless the enabler is used. It has nothing to do with desync.
None.
why do you want to force a weapon change anyway? Isn't it easier to just let the player select the weapon? Having a computer automatically change my weapon for me is somewhat annoying.
I can't exactly tell you what to do, but I was thinking along the lines of changing the unitID. However if you're using a specific unit, you can always change the unit's weapon in units.dat I think.
http://farty1billion.dyndns.org/EUDDB/?pg=entry&addr=6698680http://farty1billion.dyndns.org/EUDDB/?pg=entry&addr=6690528
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
SDE, BWAPI owner, hacker.
The unit does not need to be preplaced if you can write ASM and a hook (code detour), which is possible if you have EUD Enabler. I won't assist with it though.
why do you want to force a weapon change anyway? Isn't it easier to just let the player select the weapon?
That's exactly what's supposed to happen. The player selects a weapon, and the weapon on their unit is automatically changed to whichever weapon they selected.
Thanks for the offsets. I didn't take a deep look into the EUDDB, so I must have missed that entry when I skimmed it over.
That solves my problem, thanks!
Post has been edited 1 time(s), last time on Jan 19 2011, 5:59 pm by xAngelSpiritx.
None.
You may think this is solved, but you're doing it wrong (partially because I didn't understand the situation).
You don't need EUD actions to "switch weapons" as it's been done before with just conditions, and it can be done either via single player or multi player, though multiplayer is slow.
http://www.staredit.net/topic/6865/this thread has a number of maps in it which demonstrate hopefully exactly what you want to do, and should tell you how to do it (ignore the shared HP thing).
If you want single player, hopefully you have watched the EUD tutorial video on how to use artmoney/cheat engine to find and change data and convert them into EUD or EPD triggers. All you need to do is find your currently selected unit's 4 byte pointer value (the firebat in my map has a pointer value of 6398840) and search for it. I can almost guarantee you that only two things will show up. One is the shared current selected unit, which you need to find anyway to find the number of the unit you've selected, and the other will be the locally currently selected unit (which is polled every frame, rather than every 8+ frames).
I highly doubt you have solved this completely, so until you have a working map and understand it all, I'm going to leave this open. Go ahead and ask any questions about it in this thread, though I encourage you to read through the stickies on EUDs.
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"
With respect, rockz, I'm not entirely new to the subject. I am a programmer myself (albeit a beginner). I understand all the basics; what's an address, byte, difference between signed and unsigned, etc, etc.
The problem is solved, of finding a smooth way for a unit to switch weapons through user input.
Originally, I had planned to do what you did in your test map, and switch between different units. Now, however, instead of switching units, a solution was found by
directly changing the unit's weapon:
None.
then you have working triggers, yay!
"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"