| 01-26-2006, 09:46 AM | #2 |
I don't know why nobody has any answers to any of my questions. I spent a few more hours looking into this problem. It turns out everything works if I create an effect directly at "Position of u" instead of setting p to equal Position of u and then creating an effect at p. But that way will leak, correct? How can I do this without leaking and without bugging??? Also, my theory with waiting for the sound to start wasn't true. How are you supposed to trigger sounds? And why does it seem like you can't play the same sound twice in quick succession? It waits for the previous sound to play all the way through before that sound can play again. And why doesn't putting a sound effect on an ability in the object editor do anything? Oops, that's not a trigger question. |
| 01-26-2006, 11:01 AM | #3 |
that code just confuses me.... but 1 see 1 major issue right off the bat: your declaring a local as "udg_". (udg is the prefix for globals, and as i see, you alredy have a global "e" (thus "udg_e")) convert it to JASS and post it again, and ill try to help. |
| 01-26-2006, 12:26 PM | #4 |
This code makes my eyes hurt :/ Why did you make IFs in Custom script? |
| 01-26-2006, 06:05 PM | #5 | |
Quote:
|
| 01-26-2006, 06:06 PM | #6 |
actually, you can do like this: local effect udg_e it gives you the possibility to use gui actions to the local effect. I only think it works for 1 global per function though. custom script ifs are often used when you need to check... locals for example, or when you dont need the else. If you want to make it stop just make a timer or something checking if the unit got those buffs, and then order it to stop. To your TextTag problem, i suggest you check so that the TriggeringUnit actually is your unit after every loop. |
| 01-26-2006, 09:25 PM | #7 |
Sorry if the code makes your eyes hurt, but as I said, the problem boils down to this: "myPos = Position of myUnit" doesn't work. At least not in my situation there, and it makes no sense. I forget what the custom Ifs were for but I was doing things different before, I think I was using an elseif or something. At least this way I can say "If udg_b" instead of "If b == True". And yes, I made a local with udg_ so I could access it with GUI functions, I haven't bothered to learn all of JASS so I find that the easiest way to do things. |
| 01-26-2006, 09:26 PM | #8 | |
Quote:
my origional request stands: please post the trigger in full JASS. |
| 01-26-2006, 10:33 PM | #9 |
The Unit Group - Pick every unit in unit group thing, it uses another function, so locals won't work, you would be setting the value of the global b instead of the local udg_b for the record you don't even need to make it local, cause there are no waits during the time you use that variable. You need a local for the effect variable instead And you have a leak, In this part: Trigger: Set p = ((Position of (Triggering unit)) offset by (Random real number between 0.00 and r) towards (Random real number between 0.00 and 360.00) degrees)Position of (triggering unit) is creating a point you are not cleaning |
| 01-26-2006, 11:27 PM | #10 |
The boolean "b" isn't a local. The only local I am using is for the effect, as needed. Thanks for the tip Vex but how would I prevent that from leaking? So I take it nobody knows why you can't set a point to the position of a unit variable? Or how to trigger sounds without them leaking? |
| 01-27-2006, 01:30 PM | #11 |
You dont have any events -.- so you cant use triggering unit.. |
| 01-27-2006, 02:57 PM | #12 |
the trigger is probably executed by another trigger that has an event |
| 01-27-2006, 02:58 PM | #13 |
Well then he cant use "triggering unit" as it doesnt referr to any unit or can he? |
| 01-27-2006, 03:01 PM | #14 | |
Quote:
if that trigger was fired off by another trigger that had a compatable event (eg: unit enters reigon) then yes, he can. (its how allot of people did "if then else" statements for RoC (before multiple conditions / actions where given to us)) |
| 01-27-2006, 03:21 PM | #15 |
ok thats new to me :P |
