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

Request of some spells

Status
Not open for further replies.
Level 2
Joined
Aug 7, 2008
Messages
14
Intro:
Hello to all i want to know if this spells can be done, and if they are possible i hope someone helps me, thx

Project:
I'm making a kind of melee map but with some new races and some changes from the existing ones, and i want to do some skills for some "ultimate defending camp" buildings, i have found really good skills for this

Request:
Type: Skills

First of all i want that this spells can be cast by units (not by heros) i want them to be used by buildings exactly.
1)Time Stop: Something like the chronosphere but with a bigger area of effect
2) A rocket to be throw from a building to so so far away, with a big cooldown and some mass damange (like a nuclear bomb xD)
3) An spell that make all allies (units and buildings) on the screen(or a large area) invisible (like with invisibility spell)
4) An spell that make all allies (units and buildings) on the screen(or a large area) invulnerable (like Paladin's spell)
5) A pasive spell, that makes a very random chance of summon a demon (it will be used for a demon portal)

If someone could help me in any of this skills i would be so glad, thx
 
Last edited:
Level 5
Joined
Jul 24, 2007
Messages
199
Don't double-post. Edit your previous posts, writing "P. S.", or what.
The mass invis and invulnerability are simple, I can do them (I wonder if they weren't done already). And the passive ability - can you explain, it means that demons will be summoned through random periods of time? I see two schemes: either, when the previous one was summoned, time before the next summoning is selected randomly, or each period of time (for example, each 10 seconds) we throw dice and, if the chance triggers, we summon a demon.
 
Level 2
Joined
Aug 7, 2008
Messages
14
Oks, i have fixed that trouble with doble posting x__X

And the idea is that if the building (a Demon Portal) takes damange it have to had a little % of summoning a demon (for a Period of time). That's the idea
:wink:
 
Level 5
Joined
Jul 24, 2007
Messages
199
I'm not English, nor my Editor is, so I'll try to write it with own words (being unable to copy from editor):

Trigger "MassInvisibilityCast"
- Events
- - Generic unit uses ability
- Conditions
- - Ability being cast Equal to [Ability - Mass invis]
- Actions
- - Custom script: set bj_wantDestroyGroup = true
- - Pick Every Unit In (Units in range 900 of (UnitLocation(TriggerUnit)) matching (Matching unit is an ally to (Owner of TriggerUnit))) and do Actions (multiple):
- - - Create 1 [dummy-type unit] for Owner of Picked Unit in UnitLocation(Picked Unit) facing [no matter how many] degrees
- - - Hide Last Created Unit (farther - LCU)
- - - Apply 1 second Expiration Timer of type 'Timed Life' to LCU
- - - Add the ability [simple invisibility] to LCU
- - - Order LCU to 'Sorceress (Human) - Invisibility' Picked Unit

[simple invisibility] must be Sorceress' invis with no mana cost, and [dummy-type unit] may be albatross (so says tutorial ^^), but actually it can be your own unit-type, with no attack and abilities.

Trigger "MassInvulnerabilityCast"
- Events
- - Generic unit uses ability
- Conditions
- - Ability being cast Equal to [Ability - Mass invuln]
- Actions
- - Lock ability [inventory] for Owner of Trigger Unit
- - Custom script: set bj_wantDestroyGroup = true
- - Pick Every Unit In (Units in range 900 of (UnitLocation(TriggerUnit)) matching (Matching unit is an ally to (Owner of TriggerUnit))) and do Actions:
- - - Add ability [Inv1] to Picked Unit
- - - Create Item [potion of invulnerability] and give it to Picked Unit
- - - Remove ability [Inv1] from Picked unit
- - Unlock ability [inventory] for Owner of Trigger Unit

Ability [inventory] means the ability which is used by all Heroes to acquire/use items (if you use also other inventorys for simple units, that abilities should also be locked). Ability [Inv1] is the same ability with 1 inv slot and possibility to use items checked "Yes". "Potion of Invulnerability" means item copied from such potion, but with "Powerup" (used instantly) checked "Yes".

Trigger "DemonPortalSummon"
- Events
- - [Demon Portal] takes damage
- Conditions
- - Random real number between 0 and 100 is less than DamageTaken*q
- Actions
- - Create 1 [Demon] for (Owner of Triggering Unit) at (Position of Triggering Unit) facing (Random angle) degrees

Trigger "NewDemonPortal"
- Events
- - A unit finishes construction
- Conditions
- - Unit-type of Constructed structure Equal to Demon Portal
- Actions
- - Add the event (Constructed Structure takes damage) to trigger "DemonPortalSummon"

q is coefficient that you can set as you like; for example, with q = 1, 100 damage taken will surely make the portal summon someone. q is assumed to be real, not integer.

If you have many unit-types of Demon Portals, you have to enumerate them in the conditions of the last trigger, through Or (Multiple Conditions). The previous trigger should have all Demon Portals existing at the start of the map to be enumerated in events 'Takes damage' as in example. (If there aren't any portals, just don't add any events).

The scheme of probability of summoning is linear; honestly, it is not correct mathematicly, because one 100-damage blow will 100%ly summon 1 demon, but 2 blows 50 damage each - only 75%ly. The average number of demons is anyway the same (until you overcome 100 damage at one blow), but there is a way to re-write that condition with logarithms, if you're interested.

And the last thing. If some upgrades must increase the chance of summoning, make q a global variable and add following trigger:

Trigger "DemonPortalSummonUpgrade"
- Events
- - A unit finishes research
- Conditions
- - Researched Tech-type Equal to [Tech that improves chance]
- Actions
- - set q = q - 0.2 (or minus any other real number you like, but avoid going q below zero; if tech is 3-level, note that it will substract the number three times).
 
Last edited:
Status
Not open for further replies.
Top