Building a map where you can swap weapons during battle. Basically I'd like to be able to use EUD to detect the unit HP of the current weapon, then when you swap to different weapon I'll use built in Action of "Set Unit Hit Points %" to align the newly equipped weapon with the life of the old equipped weapon. Won't be perfect but I think it'll be good enough. Possible to use EUDs to detect the initial unit's HP?
None.
Yes. Before swapping the unit, find the unit's CUnit address, grab its HP value, change the unit, go to the player's Last Unit Pointer for the newly created unit's CUnit address, and apply your stored HP value to it (which would be much more precise than the set hit points percentage action).
Dunno if you're using an EUD editor, but if not, I can provide instructions to implement it manually if needed.
A while ago I used a basic EUD Trigger editor and one of the features was detecting a specific units health.
I don't know to much about EUDs but I found:
1) You can run a trigger for when a specific unit is above/below or at a specific HP value. (Such as if a structure/unit reaches below 50% health or shields, spawn a bunch of enemies).
2) You can directly modify that units health. You can increase the health by exactly 10, or however much you want to. Beware, I noticed that this can go OVER the maximum health. (A unit could technically have 2500 health out of 2000 maximum. I never seen how it interacts with shields).
3) I found that when I used said EUD triggers, it would correct save files. Not sure how to get around this. This only matters if you value players saving games to come back to play later (such as campaigns or really long single player games or group friend RPG games).
4) As mentioned by DarkenedFantasies, its based on the Unit's address. Because of this, the unit needs already exist within the map (not made by a trigger). This can make death "seemingly" permanent as it would be very difficult to set a unit's address to the correct value mid-game. From asking around, I couldn't find a solution to this so it would be interesting if someone had one. A tedious way to get around would be to just have a "lives" system and preplaced copies of the unit. As a result, life-1 may be Index:0, life-2 may be Index:1, and life-3 may be Index:2 and so on. And the triggers, I imagine, would have to be copied with each new index value (which may be a pain).
I also did a test with a Siege Tank, and found that it seems to occupy multiple index points (Due to its ability to transform). Was entertaining since the test involved modifying its attackspeed to auto-reset each trigger check (essentially having it attack ~4 times a second).
Hope anything was helpful!.
None.
4) As mentioned by DarkenedFantasies, its based on the Unit's address. Because of this, the unit needs already exist within the map (not made by a trigger). This can make death "seemingly" permanent as it would be very difficult to set a unit's address to the correct value mid-game. From asking around, I couldn't find a solution to this so it would be interesting if someone had one. A tedious way to get around would be to just have a "lives" system and preplaced copies of the unit. As a result, life-1 may be Index:0, life-2 may be Index:1, and life-3 may be Index:2 and so on. And the triggers, I imagine, would have to be copied with each new index value (which may be a pain).
When creating a unit with a trigger, you simply use the player's "Last Unit Pointer" to find its index. Either store the value for later use or apply your actions to the unit any time before you create another. If you don't know the unit's index, you can go to the player's last unit and use "Previous Player Unit" to narrow down your search by cycling through only the units of that particular player, but it would be wise to keep track of the indexes you want whenever possible.
4) As mentioned by DarkenedFantasies, its based on the Unit's address. Because of this, the unit needs already exist within the map (not made by a trigger). This can make death "seemingly" permanent as it would be very difficult to set a unit's address to the correct value mid-game. From asking around, I couldn't find a solution to this so it would be interesting if someone had one. A tedious way to get around would be to just have a "lives" system and preplaced copies of the unit. As a result, life-1 may be Index:0, life-2 may be Index:1, and life-3 may be Index:2 and so on. And the triggers, I imagine, would have to be copied with each new index value (which may be a pain).
When creating a unit with a trigger, you simply use the player's "Last Unit Pointer" to find its index. Either store the value for later use or apply your actions to the unit any time before you create another. If you don't know the unit's index, you can go to the player's last unit and use "Previous Player Unit" to narrow down your search by cycling through only the units of that particular player, but it would be wise to keep track of the indexes you want whenever possible.
Glad to see it's possible. EUDs are all new to be so it'll probably be awhile before I get to learning to implement them, but I wanted to see if it was possible before building the map around that expectation.
None.
4) As mentioned by DarkenedFantasies, its based on the Unit's address. Because of this, the unit needs already exist within the map (not made by a trigger). This can make death "seemingly" permanent as it would be very difficult to set a unit's address to the correct value mid-game. From asking around, I couldn't find a solution to this so it would be interesting if someone had one. A tedious way to get around would be to just have a "lives" system and preplaced copies of the unit. As a result, life-1 may be Index:0, life-2 may be Index:1, and life-3 may be Index:2 and so on. And the triggers, I imagine, would have to be copied with each new index value (which may be a pain).
When creating a unit with a trigger, you simply use the player's "Last Unit Pointer" to find its index. Either store the value for later use or apply your actions to the unit any time before you create another. If you don't know the unit's index, you can go to the player's last unit and use "Previous Player Unit" to narrow down your search by cycling through only the units of that particular player, but it would be wise to keep track of the indexes you want whenever possible.
Since you've replied to a few of my threads about the same map, I was wondering if you have time to play thru the map with me so I can explain the ideas I have (specifically EUDs and how i would like to implement them) we could also look at the Complex Hyper Triggers issue although I'm not particularly worried about that because I'm sticking with traditional HTs since they are working fine.
None.
Since you've replied to a few of my threads about the same map, I was wondering if you have time to play thru the map with me so I can explain the ideas I have (specifically EUDs and how i would like to implement them)
I would prefer not doing that, sorry. I'm fine with just giving you pointers and stuff. Though, going by your current shoutbox discussion, if you're going to use an EUD editor, you'd be better off seeking on-hands help from someone else who uses them. I don't use them so I don't know the process of implementing EUDs that way, only manually through classic triggers, and as such could probably only be able to help by telling you what's technically possible or what you need to look for.
About your issue with the hyper triggers, just do as Ultraviolet said in the other thread. Either attach the map to your post so anyone can help, or PM me a link if you'd prefer to keep the map private. I don't understand why we should do it any other way.
Since you've replied to a few of my threads about the same map, I was wondering if you have time to play thru the map with me so I can explain the ideas I have (specifically EUDs and how i would like to implement them)
I would prefer not doing that, sorry. I'm fine with just giving you pointers and stuff. Though, going by your current shoutbox discussion, if you're going to use an EUD editor, you'd be better off seeking on-hands help from someone else who uses them. I don't use them so I don't know the process of implementing EUDs that way, only manually through classic triggers, and as such could probably only be able to help by telling you what's technically possible or what you need to look for.
About your issue with the hyper triggers, just do as Ultraviolet said in the other thread. Either attach the map to your post so anyone can help, or PM me a link if you'd prefer to keep the map private. I don't understand why we should do it any other way.
I sent you a direct message, thank you
None.