HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Sudden-"Curse" Help?

04-04-2004, 01:33 AM#1
Lu Baihu
I want to make it so that if anyone but a trained Scout Sniper picks up a Sniper Rifle, that suddenly that character has Curse inflicted upon them; this is to last until they drop the rifle. I know about dummy unit, but I can't seem to get this spell right, because it seems that the Boolean comparisons and Unit-Type comparisons (Conditions) are not able to get it to be 'any unit besides Scout Sniper' :( help?

Quote:
Events: A unit acquires an item
Conditions: Item = Sniper Rifle; (any efficient way to have the unit-type be any other than Scout Sniper?)
Actions: Create 1 Caster for Neutral Passive at (position of (triggering unit)) facing Default building facing degrees; Order (last created unit) to Curse (triggering unit); Wait 5 seconds, Remove (last created unit) from the game.

The other idea was to remove Curse from said unit if it drops the rifle, but how do I get the Condition to work (Item-type) & having the Curse negative buff ...
04-04-2004, 07:09 AM#2
Lu Baihu
Quote:
Originally Posted by Alpha Disjunction
Unit add a penalty ability to aquiring/manipulating unit

Hmm ... I didn't think of what you posted :) however, at the same time, "add a penalty ability"?? I just want the (negative) buff of Curse to be placed upon the character, and removed when he drops the weapon ...
04-04-2004, 03:24 PM#3
BattleBotv8.2
Cant you create a dummy caster and cast the spell on Unitvarible which is the person who picked that item up. And if he still has the item, cast curse on him every X seconds where x is the curse spell cooldown.
04-04-2004, 05:33 PM#4
Lu Baihu
Quote:
Originally Posted by BattleBotv8.2
Cant you create a dummy caster and cast the spell on Unitvarible which is the person who picked that item up. And if he still has the item, cast curse on him every X seconds where x is the curse spell cooldown.

I am using a dummy caster, but see my posted Conditions from the first script, I'm sure they're not working; could you help? (I didn't think of Unit Variable, I'm just having the [Last created unit] cast Curse on the [Triggering unit].)
04-06-2004, 12:24 AM#5
Lu Baihu
Quote:
Originally Posted by Alpha Disjunction
I would do something along the lines of:
Code:
local unit u = GetManipulatingUnit()
local widget w = GetManipulatedItem()
local unit c
Create dummy caster at map center
set c = GetLastCreatedUnit()
loop
    exitwhen IsUnitType( UNIT_TYPE_DEAD) or (unit has item w == false)
    call IssueOrderUnit(c, "curse", u)
    call PolledWait( 1.00)
endloop
call KillUnit(c)
set c=null
set w=null
set u=null

Hmm ... I like the code :) but is it good as long as I simply plug in the appropriate four-digit codes (ie Aloc, h004), etc? (I don't know JASS at all, and I currently have the caster appearing at the position of the "triggering unit", not "Hero Manipulating Item" ...)
04-08-2004, 06:57 AM#6
Lu Baihu
Mmmm! Good, I like -- thank you, Alpha! :)

The only thing I need now is the max duration of Curse, and to remove the Curse if the non-appropriate unit drops the item ...

Edit: Never mind, got that to work too -- thank you for everything :)