• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Spell tutorials?

Status
Not open for further replies.
Level 2
Joined
Jul 14, 2004
Messages
14
Hey, i was wondering if there are any spell tutorials out there. I can only find 1 on wc3c, and its not even completed!
 
Level 2
Joined
Jul 14, 2004
Messages
14
Well, my problem is i cant get my dummy spell working. I have it like

Code:
Events
    Unit - A unit Starts the effect of an ability
Conditions
    (Ability being cast) Equal to some name
Actions
    Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Center of Region 000 <gen>) facing Default building facing degrees
    Unit - Order (Last created unit) to Human Sorceress - Invisibility (Triggering unit)
    Unit - Order (Triggering unit) to Stop
    Unit - Remove (Last created unit) from the game
    If ((Current order of (Triggering unit)) Not equal to (Order(stop))) then do (Unit - Remove All buffs from (Triggering unit)) else do (Do nothing)

But that dont work. The triggering unit does not become invisible or anything! Nothing happens
 
Level 2
Joined
Jul 14, 2004
Messages
14
It still dont work. Well the unit playes the animation from warstomp (that i based my spell on), and it seems that the dummy gets created, but still, nothing happens. Any idea why?
 
Level 2
Joined
Jul 14, 2004
Messages
14
Where should i place the wait action? I've tried some different places, but that still dont make him invisible.
And also, i have changed that thing with the region now. Thanks :wink:
 
Level 13
Joined
May 5, 2004
Messages
1,330
Unit - Order (Last created unit) to Human Sorceress - Invisibility (Triggering unit)
Wait 1 seconds
Unit - Order (Triggering unit) to Stop

But I see another problem, perhaps the "triggering unit"-definitions mess up a bit, I'll test that (in exactly 4 hours, then I'm back home)
 
Level 6
Joined
Mar 25, 2004
Messages
235
Store the casting unit into a variable, i've had troubles with that too, i think that the dummy unit becomes the casting unit (for any reason), so that should solve the problem (at least for me, it did)

And is your invisibility spell custom? You should use the default one, cous using custom ones always gives troubles...

And don't forget the wait action between -Issue to cast and -issue to stop.
 
Level 7
Joined
Mar 26, 2004
Messages
350
create an unit variable, like TheWickerMan already said.

your first action should be: set "yourunitvariable" = tirggering (or casting :wink: ) unit.

then replace all "triggering unit" with the variable
 
Level 2
Joined
Mar 9, 2004
Messages
39
-Actions: an unit 'begins casting a spell'


have wait 1 second after u create the unit
-----------------------------------------------
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Center of Region 000 <gen>) facing Default building facing degrees
Unit - Order (Last created unit) to Human Sorceress - Invisibility (Triggering unit)
Unit - Order (Triggering unit) to Stop
Unit - Remove (Last created unit) from the game
If ((Current order of (Triggering unit)) Not equal to (Order(stop))) then do (Unit - Remove All buffs from (Triggering unit)) else do (Do nothing)

u need to change the casting time of the invisability to 0.01 or something very small so it is a fast cast

u need to change the range to 9999999 so it can be cast on the casting/triggering unit anywhere the map is

have wait 1 second after u create the unit and before the issued stop

change the dummy spells casting time to less than 1 second

--change the unit's invisability ability able to target heros-- unsure if it does alreaday--

---------------------------------------------
Lazy Man's alternative

Use invisability spell as dummy spell
change the target to self
and no trigger at all lol :lol:
 
Level 13
Joined
May 5, 2004
Messages
1,330
What should be the function of this action:

If ((Current order of (Triggering unit)) Not equal to (Order(stop))) then do (Unit - Remove All buffs from (Triggering unit)) else do (Do nothing)

It removes the visibility every time. For me, your spell works without problems.

Here my current trigger:


Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to [Any]
Actions
Unit - Create 1 Sorceress for (Owner of (Casting unit)) at (Position of (Casting unit)) facing 0.00 degrees
Unit - Order (Last created unit) to Human Sorceress - Invisibility (Casting unit)
Wait 1.00 seconds
Unit - Order (Casting unit) to Stop
Unit - Remove (Last created unit) from the game
 
Level 2
Joined
Jul 14, 2004
Messages
14
If ((Current order of (Triggering unit)) Not equal to (Order(stop))) then do (Unit - Remove All buffs from (Triggering unit)) else do (Do nothing)

is made so the unit cant move or attack or anything without becoming visible again. This is kind of a modified shadowmeld spell.

Anyway, it still dont work for me. maybe its because i based the spell on warstomp? But would you please make a w3x file for me?
 
Level 2
Joined
Jul 14, 2004
Messages
14
Yeah, its working now, except for one little thing: I dont want the unit being able to move when he uses the ability. So if he moves attacks or casts a spell, i want it to make him visible again. How can i do that? cause the other trigger i had dont seem to work...
 
Level 13
Joined
May 5, 2004
Messages
1,330
I'll see if I get a working action for that.

Edit: Hm, I think a second trigger is better, because your current trigger will only check one time if the unit is doing nothing or not. If the unit moves after the trigger ran, It won't remove the buff, I think.
 
Level 2
Joined
Jul 14, 2004
Messages
14
I cant really see a way to do that... It would be something like "every 0.01 of game time" i think, but i cant find a way to check if the unit has the buff.
 
Level 7
Joined
Mar 26, 2004
Messages
350
set a unit variable in your first trigger:
set "unit" = triggering unit

then crate a second trigger:
Code:
event - gereic unit is issued an order targeting an object
condition: triggering unit = "unit"
                 issued order = attack
action: remove all positive buffs for triggering unit

haven't tested, but should work
 
Level 2
Joined
Jul 14, 2004
Messages
14
It dont removes the buff when the hero moves (and yes, i changed attack to move)
 
Status
Not open for further replies.
Top