| 02-04-2004, 11:41 PM | #1 |
My problem is i have a hidden unit kill the units after a spell fires. Well i change its ownership and the spell fires fine but the problem is when i change it back it drops outta my variable for some reason so next time i call for the unit to kill someone it doesn't work. Now i've tested it without changing ownership back and it works fine so can someone help me figure out whatz wrong. Then - Actions Custom script: call HolyLight1() \\ This is a custom Wait Trigger Game - Display to (Triggering player), at offset (0.00, 0.00) the text: Hurt Unit - Change ownership of HiddenUnit to (Player((Player number of (Local player)))) and Change color Unit - Order HiddenUnit to Attack HolyLightTarget[(Player number of (Local player))] Custom script: call HolyLight2() \\ This is a custom wait trigger Unit - Change ownership of HiddenUnit to Neutral Passive and Change color Also i forgot you might have seen that i use Local Player i remember there being a way to use Local Player like how i am but not cause any desyncs. How would i go about doing that? |
| 02-04-2004, 11:52 PM | #2 |
The only thing i can think of would be resetting the variable at the end. Variable: Set hiddenunit to whatever the unit is. I dont know but give it a try, im an idiot lol. |
| 02-04-2004, 11:59 PM | #3 |
I was going to do that but there is no way for me to detect what the unit is without like a pick all units of type command which i'd rather not use. Is there a way for me to detect last ownership changed unit? |
| 02-05-2004, 12:30 AM | #4 |
yup, unit - event response - ownership changed unit or soemthing like that, i jsut checked it's all there ;) yep yep, i luv the editor :) |
| 02-05-2004, 02:26 AM | #5 |
Nope still hasn't worked once i fire it once it won't find the unit in the variable anymore. But it only does that after i change its ownership twice. Here is my new code: Then - Actions Custom script: call HolyLight1() Game - Display to (Triggering player), at offset (0.00, 0.00) the text: Hurt Unit - Change ownership of HiddenUnit to (Player((Player number of (Local player)))) and Change color Unit - Order HiddenUnit to Attack HolyLightTarget[(Player number of (Local player))] Custom script: call HolyLight2() Unit - Change ownership of HiddenUnit to Neutral Passive and Change color Set HiddenUnit = (Ownership-changed unit) |
| 02-05-2004, 04:46 AM | #6 |
you may have to set the variable in between the two different ownership changes too.. |
| 02-05-2004, 11:31 AM | #7 |
K i'll try that |
| 02-05-2004, 08:30 PM | #8 |
A new question i basically am still stuck with the ownership for somereason it just won't let you change it twice and keep it in the variable. But anyways my next question is since i can't remember how to do it where do you go to make it so the Idle Peasent Icon doesn't show when you have an idle peasent. I remember a trigger but i don't know where it is or whatz its called. |
