• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Auto-cast spells need help!

Status
Not open for further replies.
Level 3
Joined
Jun 16, 2004
Messages
36
I need help with a spell.

i want it so it acts like a gun. Like if i have a auto cast spell names Sniper, then My attack kinda changes. Like more range, dmg, but slower, also want something like Fully Auto, Gernager, SMG, stuff like that. Useing Auto-Casting

Or, can I do that with an Iteam? If im holding my item, it changes my attack.

THanks, hope someone can help! :D
 
Level 3
Joined
Jun 16, 2004
Messages
36
Yah, I was thinking that, but if i have units that lv up, wont it be hard, with all the spells and stuff?

I think i got a solution, still working on it. :wink:

Is there a trigger that changes the unit but still keeps the spells and abilitys?
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
Elthanor said:
Yah, I was thinking that, but if i have units that lv up, wont it be hard, with all the spells and stuff?

I think i got a solution, still working on it. :wink:

Is there a trigger that changes the unit but still keeps the spells and abilitys?

Thats easy, u just use integer variables for the lvl and skill lvls.

Elthanor said:
sfrry for double post, i was wondering is there a way to have it so if a unit enters it

enters IT? what it? :p
 
Level 3
Joined
Jun 16, 2004
Messages
36
oops, srry about that. Here is what i ment to write :p

" i was wondering is there a way to have it so if a unit enters a REGION, its range does up, and being able to see farther, but when it leaves the region, its back to defult? "

Yah, that is what i ment.

I saw a trigger that you can set the acquisition range, is there a way to set it for depending on what lv skil you have? Like if i have a skill for a hero called "Increase Range" then everytime he increase the lv, his rannge goes up, how would i do that?

Thanks
 
Level 9
Joined
Sep 8, 2004
Messages
633
As for the attack system, i'd recommend a trigger like this:

If a unit aquires an item (assuming only one item can be held at a time)

Conditions: none

Actions:
If item type of (item picked up) equal to (smg)

Then turn off (all gun abilities) for owner of triggering unit
turn on ability smg

Okay, i know, this has nothing to do with editor code, but it's the basic way the trigger can be set up (the way i use it in my map).
Basically, you make an ability for each attack type, give the unit itself no attack. Then if it aquires an item, enable the ability corresponding with the item, and disable any others. Make all abilites autocast (can use dummy casters for that, triggered) and you're done.

Replacing units often results in a lot of lag, i wouldn't recommend that.
 
Status
Not open for further replies.
Top