• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

Spell System

Status
Not open for further replies.
Level 3
Joined
Jan 26, 2008
Messages
38
I dont know if this is the correct thread but I have an issue. Id like it if someone could make or teach me how to make a spell system where the spell does x# a players intelligence or agility or strength. By this I mean. Say for example Death Coil. Instead of it doing like 200 damage, Id like it to do 4x the Death Knights strength. I dont know if thats a spell system or just a certain way to make the spell but regardless I would like to know how. Thank you.
 
Level 6
Joined
Aug 24, 2007
Messages
161
First, make a spell that does nothing. Next, make a dummy unit. (There's a tutorial on how to make dummy units in the Tutorials section.)Then, make an real variable. Make a trigger. Make a generic unit event that states a unit begins casting an ability. The Condition will be ability comparison. Set it to the dummy spell. Make an Action that is named Set Variable. Select the real variable for the variable to be set. Make it equal Convert - Integer to Real. Set value to Hero - Hero Attribute. Make the rest however you want. Then click OK. Make another action that creates a unit. Set it to make one of the dummy unit you made. Make a third action that issues the unit an order to damage a unit (unit of ability being cast) dealing the real variable as damage with an attack type of spell and damage normal. Make another action for wait - Wait 1 second. Make another action (last one) that says Unit - Kill Unit. (kill last created unit) You're done! Here's my trigger if you want to look at it:

  • Spell
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • Set Strength_Damage = (Real((Strength of (Casting unit) (Exclude bonuses))))
      • Unit - Create 1 Footman for (Owner of (Casting unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
      • Unit - Cause (Last created unit) to damage (Target unit of ability being cast), dealing (Strength_Damage + 0.00) damage of attack type Spells and damage type Normal
      • Wait 1.00 seconds
      • Unit - Kill (Last created unit)
 
Level 13
Joined
May 11, 2005
Messages
416
i suppose that footman is the dummy unit...i think you should use remove unit instead of killing it...not sure why though XD just a habbit i picked up long ago, probably cuz of leaks...

i didn't knew of this action: "Unit - Cause (unit) to damage (unit), dealing (Damage) damage of attack type Spells and damage type Normal"

thanks
 
Level 3
Joined
Jan 26, 2008
Messages
38
i have a problem with that kill face. When i do that world edit shuts down. any ideas on how to fix it?

Specifically right when i make the action then try to save or test map it shuts down

EDIT: nevermind i was deleting old variables. ill try it again
 
Status
Not open for further replies.
Top