| 08-05-2007, 07:13 AM | #1 |
I'm using U.V.'s Physics Engine (I don't quiet need 3D... yet, also it's a GUI engine ), and it says something along the lines of...Trigger: Set ReaAng[(Custom value of (Triggering unit))] = (Angle from (Position of Some Random Unit 0002 <gen>) to (Position of (Triggering unit)))I need a function which lets me call for the unit the SomeRandomUnit, even though it's a specific function. I'm able to integrate a custom script call because I'm using a WE extension... so my question is, is there a way to detect the Some Random Unit via a generic term (e.g. Triggering Unit)? |
| 08-05-2007, 07:57 AM | #2 |
Set Tempunit = the random unit use the tempunit in the GUI (Angle from (Position of Some tempunit) to (Position of (Triggering unit))) then there is the ability to call the unit ;P |
| 08-05-2007, 09:50 AM | #3 |
I'd rather avoid that, but if there's no other solution, I'll just use yours. I want something that's MUI. |
| 08-05-2007, 09:30 PM | #4 |
easy way to make it MUI = Set Tempunit[owner of triggering unit] = the random unit use the tempunit[owner of triggering unit] in the GUI (Angle from (Position of Some tempunit[owner of triggering unit]) to (Position of (Triggering unit))) as long as the spell cant be cast by the same player more then once at a time this will make it MUI (if it is possible for them to use it more then once i can do this another way) PS: if you do need to make it MUI for each player pm me in case i dont see your reply |
| 08-06-2007, 06:07 AM | #5 |
That's not fully MUI... what happens if one player owns two of the random units? |
| 08-06-2007, 06:50 AM | #6 |
Learn JASS, then :P I'm not totally sure if this would work: Trigger: ![]() set global variable unit = random unit![]() custom script: local unit u = unit |
| 08-07-2007, 12:08 PM | #7 |
No, Dil999, it wouldn't work, at all. What are you trying to do anyway? What trigger are you using this in? What's it supposed to do? |
| 08-07-2007, 12:34 PM | #8 |
well if you want to make it MUI in GUI then you can do it like this my recommendation is learn JASS tho ;P if player number owner of triggering unit < 10 then tempstring = 0+(player number owner of triggering unit) Else tempstring = player number owner of triggering unit Tempunit[Convert string((custom value of triggering unit) + tempstring] = random unit that will work so long as you dont already use custom values if you do it gets significantly more complicated using local variables and such... however this method is not the most efficient or even close ; / You might want to take a look at the tutorials section there is a link for a "the ways of MUI in GUI" (or something like that) Tutorial that also might help you make it MUI PS: I STILL recommend learn at least a little JASS it would make your life easier at least in doing this |
