• 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.

Spell related stuff

Status
Not open for further replies.
Hi i'm making a zombie map (huh, not another one:slp:) where you reach from point A to B then back to A.
Currently...
-I need to know how to make a kick/shove spell (not vote kick actual kick)
-My map is going to have terrain-specific stats.
E.g Rock gives you evasion cover, forest gives -speed and +evasion, road +speed -evasion
My brother said to make a unselectable unit that looks like a doodad and give it an aura.
Can I make a -speed,-armor etc. Aura? I don't know how to give - aura.
How do i make a unit unselectable?

That's it for now. I would appreciate it if someone would help at least on one of my problems
 
The kick-trigger is pretty easy... there are 2 ways of doing it:


  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Color[1] = blue
      • Set Color[2] = teal
      • Set Color[3] = purple
      • Set Color[4] = yellow
      • Set Color[5] = orange
      • Set Color[6] = green
This sets up the colors... obviously (it's best to merge this with an already existing map init trigger)

  • Kick
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick as A substring
    • Conditions
    • Actions
      • For each (Integer i) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entered chat string) Equal to (-kick + Color[i])
            • Then - Actions
              • Game - Defeat (Player((i + 1))) with the message: You have been kicked
              • Game - Display to (All players) for 7.00 seconds the text: (|c00444488 + ((Name of (Player((i + 1)))) + |r has been kicked))
            • Else - Actions
And this is the kick-trigger, if the message is -kick + (color defined in map init), then the player matching that color will be kicked.
Easy and efficient...


This method is even easier, but a bit different: red will have to say -kick X (where X is a number)
  • Kick
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick as A substring
    • Conditions
    • Actions
      • For each (Integer i) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entered chat string) Equal to (-kick + (String((i + 1))))
            • Then - Actions
              • Game - Defeat (Player((i + 1))) with the message: You have been kicked
              • Game - Display to (All players) for 7.00 seconds the text: (|c00444488 + ((Name of (Player((i + 1)))) + |r has been kicked))
            • Else - Actions
That's it... the entire kick-trigger, that's easy, right?



The second can be done in multiple ways, with auras is a possibility, yet the terrain has to be round, since auras are... well, round.
If you want it that way, it's really easy (yet again): just go to the aura you want (let's say command aura, for -damage), go to the data which affects the damage, press shift + enter on it and the type in "-X", where X is a number, it will now be a negative value and thus give -damage.


The third question is something you will need a lot (for dummies, escape-maps, etc): go to the unit you want to be unselectable and add the ability "locust", the unit will be unselectable and when ALT is pressed in-game, the HP-bar won't show.
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
My suggestion is kinda different...red won't be always the host,and i assume you want the host to kick players right?
Then do this...
Copy and paste this
JASS:
function GetHost takes nothing returns nothing
    local gamecache g = InitGameCache("Map.w3v")
    call StoreInteger ( g, "Map", "Host", GetPlayerId(GetLocalPlayer ())+1)
    call TriggerSyncStart ()
    call SyncStoredInteger ( g, "Map", "Host" )
    call TriggerSyncReady ()
    set udg_Host = Player( GetStoredInteger ( g, "Map", "Host" )-1)
    call FlushGameCache( g )
    set g = null
endfunction

in custom script...(its the first thing in the triggers,looking like your map),this runs before all other triggers.

Create a Player-type variable,named Host.

Then create this trigger
  • Get Host
    • Events
      • Time - Elapsed game time is 0.02 seconds
    • Conditions
    • Actions
      • Custom script: call GetHost()
Then do this...
  • Kick Host
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick as A substring
      • Player - Player 2 (Blue) types a chat message containing -kick as A substring
      • Player - Player 3 (Teal) types a chat message containing -kick as A substring
      • Player - Player 4 (Purple) types a chat message containing -kick as A substring
      • Player - Player 5 (Yellow) types a chat message containing -kick as A substring
      • Player - Player 6 (Orange) types a chat message containing -kick as A substring
      • Player - Player 7 (Green) types a chat message containing -kick as A substring
      • Player - Player 8 (Pink) types a chat message containing -kick as A substring
      • Player - Player 9 (Gray) types a chat message containing -kick as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -kick as A substring
      • Player - Player 11 (Dark Green) types a chat message containing -kick as A substring
      • Player - Player 12 (Brown) types a chat message containing -kick as A substring
    • Conditions
      • (Triggering player) Equal to Host
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Substring((Entered chat string), 7, 10)) Equal to blue
              • (Substring((Entered chat string), 7, 7)) Equal to 2
        • Then - Actions
          • Game - Defeat Player 2 (Blue) with the message: ((Name of Host) + has kicked you!!)
          • Game - Display to (All players) the text: ((Name of Host) + ( has kicked + (Name of Player 2 (Blue))))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Substring((Entered chat string), 7, 10)) Equal to teal
              • (Substring((Entered chat string), 7, 7)) Equal to 3
        • Then - Actions
          • Game - Defeat Player 3 (Teal) with the message: ((Name of Host) + has kicked you!!)
          • Game - Display to (All players) the text: ((Name of Host) + ( has kicked + (Name of Player 3 (Teal))))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Substring((Entered chat string), 7, 12)) Equal to purple
              • (Substring((Entered chat string), 7, 7)) Equal to 4
        • Then - Actions
          • Game - Defeat Player 4 (Purple) with the message: ((Name of Host) + has kicked you!!)
          • Game - Display to (All players) the text: ((Name of Host) + ( has kicked + (Name of Player 4 (Purple))))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Substring((Entered chat string), 7, 12)) Equal to yellow
              • (Substring((Entered chat string), 7, 7)) Equal to 5
        • Then - Actions
          • Game - Defeat Player 5 (Yellow) with the message: ((Name of Host) + has kicked you!!)
          • Game - Display to (All players) the text: ((Name of Host) + ( has kicked + (Name of Player 5 (Yellow))))
        • Else - Actions
Continue this trigger for all players...

Efficient enough in my opinion.
 
Ohh, I see... try something like this:


  • Map Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set PushTable = (Last created hashtable)
(add the above actions in an already existing trigger with the same event).


  • Push Init
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Push
    • Actions
      • Set loc[1] = (Position of (Triggering unit))
      • Set loc[2] = (Position of (Target unit of ability being cast))
      • Set PushValues[1] = 0.00
      • Set PushValues[2] = (Angle from loc[1] to loc[2])
      • Custom script: call RemoveLocation(udg_loc[1])
      • Custom script: call RemoveLocation(udg_loc[2])
      • Hashtable - Save PushValues[1] as 0 of (Key (Target unit of ability being cast)) in PushTable
      • Hashtable - Save PushValues[2] as 1 of (Key (Target unit of ability being cast)) in PushTable
      • Unit Group - Add (Target unit of ability being cast) to PushedUnits
PushValue[1] = Distance / loop
PushValue[2] = Push Angle


  • Push
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in PushedUnits and do (Actions)
        • Loop - Actions
          • Set PushValues[1] = (Load 0 of (Key (Picked unit)) from PushTable)
          • Set PushValues[2] = (Load 1 of (Key (Picked unit)) from PushTable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PushValues[1] Less than or equal to 200.00
            • Then - Actions
              • Set loc[1] = (Position of (Picked unit))
              • Set loc[2] = (loc[1] offset by 16.00 towards PushValues[2] degrees)
              • Unit - Move (Picked unit) instantly to loc[2]
              • Set PushValues[1] = (PushValues[1] + 16.00)
              • Hashtable - Save PushValues[1] as 0 of (Key (Picked unit)) in PushTable
              • Custom script: call RemoveLocation(udg_loc[1])
              • Custom script: call RemoveLocation(udg_loc[2])
            • Else - Actions
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in PushTable
              • Unit Group - Remove (Picked unit) from PushedUnits
I've tested it, it works... I can give you the test-map if you want ^^
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Ohh, I see... try something like this:


  • Map Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set PushTable = (Last created hashtable)
(add the above actions in an already existing trigger with the same event).


  • Push Init
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Push
    • Actions
      • Set loc[1] = (Position of (Triggering unit))
      • Set loc[2] = (Position of (Target unit of ability being cast))
      • Set PushValues[1] = 0.00
      • Set PushValues[2] = (Angle from loc[1] to loc[2])
      • Custom script: call RemoveLocation(udg_loc[1])
      • Custom script: call RemoveLocation(udg_loc[2])
      • Hashtable - Save PushValues[1] as 0 of (Key (Target unit of ability being cast)) in PushTable
      • Hashtable - Save PushValues[2] as 1 of (Key (Target unit of ability being cast)) in PushTable
      • Unit Group - Add (Target unit of ability being cast) to PushedUnits
PushValue[1] = Distance / loop
PushValue[2] = Push Angle


  • Push
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in PushedUnits and do (Actions)
        • Loop - Actions
          • Set PushValues[1] = (Load 0 of (Key (Picked unit)) from PushTable)
          • Set PushValues[2] = (Load 1 of (Key (Picked unit)) from PushTable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PushValues[1] Less than or equal to 200.00
            • Then - Actions
              • Set loc[1] = (Position of (Picked unit))
              • Set loc[2] = (loc[1] offset by 16.00 towards PushValues[2] degrees)
              • Unit - Move (Picked unit) instantly to loc[2]
              • Set PushValues[1] = (PushValues[1] + 16.00)
              • Hashtable - Save PushValues[1] as 0 of (Key (Picked unit)) in PushTable
              • Custom script: call RemoveLocation(udg_loc[1])
              • Custom script: call RemoveLocation(udg_loc[2])
            • Else - Actions
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in PushTable
              • Unit Group - Remove (Picked unit) from PushedUnits
I've tested it, it works... I can give you the test-map if you want ^^

Begins casting... hmm.. strange :eekani:
 
Whatever, here is the map xD
I edited the start so you can see it's 100% MUI...

(And it looks more realistic if the push happens while casting, instead of afterwards... according to me :p)

DLing 19kb won't hurt I guess ^^ try it out.
If anyone finds a nice dust-effect (like the knight's walking animation), please say so... the only dust I have found is way too big for the effect.

Edit: removed the target "Self" o_O
 

Attachments

  • PushAp0.w3x
    19 KB · Views: 60
You can always use the "Flak Cannons" SFX or the "Ancient Protector Missle" SFX.
Those do look nice indeed (the Ancient Protector Missile might be a bit too big, but certainly isn't bad).
There are plenty of effects I like, so I've made this little system that the effect changes every time you use it.
Not all are as good as others, but I don't think they're bad... the choice is yours.

The effects are in the "Init" trigger.
 

Attachments

  • PushAp0.w3x
    20.2 KB · Views: 60
Level 15
Joined
Aug 31, 2009
Messages
776
You would have to export the unit model and reimport it as a custom model, associating the exported/imported footman portrait with the exported/imported Peasent model.

However, you can't change the portrait while still in the map, unless you create 2 seperate units - one with the standard portrait, and one with the new portrait and use a unit replacement to switch between them.
 
Status
Not open for further replies.
Top