• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Spell Request : Bear Trap Spell

Status
Not open for further replies.

Deleted member 238226

D

Deleted member 238226

hello hive. me and my friend currently working on some AoS map. and currently we struggling to create a spell. i put the description below.

"Bear Trap!"
icons_6010_btn.jpg

DESCRIPTION :
Put up a really strong bear trap imbued with a magical spell that connect caster vision with the traps. the enemy can't see it. and any enemy that step on it will get immobilized, rendering them unable to move and gets unbearable terrible pain. deals X damage and Immobilize the enemy for 2 seconds. this trap also provides vision for X range. Max X traps. 350 AoE. Melee Casting Range. the traps can't be placed in other traps AoE. this skill would'nt break charm effect.

- Level 1 : Deals X damage, Immobilize for 2 seconds. provides X range vision. X Max Trap. 350 AoE

- Level 2 : Deals X damage, Immobilize for 2 seconds. provides X range vision. X Max Trap. 350 AoE

- Level 3 : Deals X damage, Immobilize for 2 seconds. provides X range vision. X Max Trap. 350 AoE

- Level 4 : Deals X damage, Immobilize for 2 seconds. provides X range vision. X Max Trap. 350 AoE


and regarding the charm effect, it means if the enemy is still affected with the charm effect, the effect will still remain and will not gone if the enemy step on the trap and get caught on it. below is the abillity description.


"Charm"
icons_3334_btn.jpg

DESCRIPTION :
Charming beauty of an elf from the noble family is really overwhelming. Lara often use it to seduce her enemy and use them for her own advantage. the enemy that got affected with this skill will lose their control. unable to do anything, and following Lara movement. the enemy that get affected with this skill will move much more slowly by X% during this skill duration. X casting range. Last X seconds. if the affected enemy got attacked, the charm effect will be disappear. except if it's hitten by the bear trap.

- Level 1 : Follow the caster movement and get slowed by X% during the skill duration. X casting range.

- Level 2 : Follow the caster movement and get slowed by X% during the skill duration. X casting range.

- Level 3 : Follow the caster movement and get slowed by X% during the skill duration. X casting range.

- Level 4 : Follow the caster movement and get slowed by X% during the skill duration. X casting range.


i only need the first spell. the spell should be in GUI and MUI. the problem that my friend got is to get this skill to be MUI. i don't have much trigger experience. i represent my friend to request this since his english is not very well. the person that create this spell will be given credits and 2+REP.

i think that "it wouldn't break if the enemy still have the charm effect" thing is not necessary to be created. i think my friend able to configure it by himself. the most important things is it need to be GUI and MUI +leakless.
 
Last edited by a moderator:
Level 17
Joined
Mar 21, 2011
Messages
1,597
some things i need to know: "the traps can't be placed in other traps AoE"
does this only count for your own ones?
350 aoe is really huge for a trap :D
"Immobilize" = stun? or disabled movement?
Should the maximum mine count be based on the player or on the unit? that only matters if the player can have the hero twice for some reason

And i cannot guarantee you to finish it today, be patient ;)
 
Level 17
Joined
Mar 21, 2011
Messages
1,597
ah, forgot about that. the AoE is meant to fit with this trap model. yes, it is really big. do you have a recomendation numbers?
I use the same model in one of my maps, i made it smaller and it just has 150 AoE ;)
but nvm, you can choose yourself, i will make a really GUI friendly setup.

nah, i don't think there will be such case like that exist in my map :p
well, i will still make it the safe way, who knows ;)
 
Level 17
Joined
Mar 21, 2011
Messages
1,597
Here it is. If you want to edit stuff, just tell me ;)
It uses Bribes Unit Indexer, give him credits if you use this.

  • Bear Trap Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- --------------------------- --------
      • -------- Short Trigger Explanation: --------
      • -------- Bear Trap Init --- This is "your" trigger, setup everything you want. --------
      • -------- Bear Trap Cast --- Trigger with "On Cast Event", creates the Trap if conditions return true. --------
      • -------- Bear Trap Explode --- Trigger with "On Death Event", damages and debuffs enemies in range. --------
      • -------- Unit Indexer --- This one is made by Bribe, give him credits if you use this. --------
      • -------- --------------------------- --------
      • -------- This is the casting ability. --------
      • Set BT_Ability = Bear Trap
      • -------- The dummy unit that is used for the spell. Make sure it fulfills the dummy requirements. --------
      • Set BT_Dummy = Dummy
      • -------- The maximum level the ability can have. --------
      • Set BT_MaxLevel = 4
      • -------- The message that displays if you reached your trap limit. --------
      • Set BT_MaxMsg = You already reached the Trap-limit
      • -------- The message that displays if there is already a trap nearby. --------
      • Set BT_StackMsg = Too close to another Trap!
      • -------- The next variables are arrays. The numbers stand for the level of the ability. --------
      • -------- The abilities the dummy casts on enemies. This does not necessarily need to be a stun. --------
      • Set BT_DummyAbility[1] = Stun (1 Second)
      • Set BT_DummyAbility[2] = Stun (1 Second)
      • Set BT_DummyAbility[3] = Stun (2 Seconds)
      • Set BT_DummyAbility[4] = Stun (2 Seconds)
      • -------- The order given to the dummy. Change it if you change the DummyAbility. --------
      • Set BT_Order[1] = thunderbolt
      • Set BT_Order[2] = thunderbolt
      • Set BT_Order[3] = thunderbolt
      • Set BT_Order[4] = thunderbolt
      • -------- The maximum trap count possible on the map for a certain hero. --------
      • Set BT_MaxTraps[1] = 2
      • Set BT_MaxTraps[2] = 4
      • Set BT_MaxTraps[3] = 6
      • Set BT_MaxTraps[4] = 8
      • -------- The trap unit that spawns --------
      • Set BT_Trap[1] = Bear Trap - Level X
      • Set BT_Trap[2] = Bear Trap - Level X
      • Set BT_Trap[3] = Bear Trap - Level X
      • Set BT_Trap[4] = Bear Trap - Level X
      • -------- The damage- and stun AoE. !Not the Explosion AoE. Change this in Object Editor! --------
      • Set BT_AoE[1] = 350.00
      • Set BT_AoE[2] = 350.00
      • Set BT_AoE[3] = 350.00
      • Set BT_AoE[4] = 350.00
      • -------- Damage dealt to the enemies. --------
      • Set BT_Damage[1] = 50.00
      • Set BT_Damage[2] = 100.00
      • Set BT_Damage[3] = 150.00
      • Set BT_Damage[4] = 200.00
  • Bear Trap Cast
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
    • Actions
      • Custom script: local unit u
      • Custom script: local unit n
      • Custom script: local unit FoG
      • Custom script: local player p
      • Custom script: local integer id
      • Custom script: local integer i
      • Custom script: local integer index
      • Custom script: local real x
      • Custom script: local real y
      • Custom script: local group g
      • Custom script: local boolean b
      • Custom script: if GetSpellAbilityId() == udg_BT_Ability then
      • Custom script: set u = GetTriggerUnit()
      • Custom script: set id = GetUnitUserData(u)
      • Custom script: set i = GetUnitAbilityLevel(u, udg_BT_Ability)
      • Custom script: set p = GetTriggerPlayer()
      • Custom script: if udg_BT_MaxTraps[i] > udg_BT_Count[id] then
      • Custom script: set b = false
      • Custom script: set x = GetSpellTargetX()
      • Custom script: set y = GetSpellTargetY()
      • Custom script: set g = CreateGroup()
      • Custom script: call GroupEnumUnitsInRange(g, x, y, udg_BT_AoE[i], null)
      • Custom script: loop
      • Custom script: set FoG = FirstOfGroup(g)
      • Custom script: exitwhen FoG == null
      • Custom script: call GroupRemoveUnit(g, FoG)
      • Custom script: set index = 1
      • Custom script: loop
      • Custom script: exitwhen index > udg_BT_MaxLevel
      • Custom script: if udg_BT_Hero[GetUnitUserData(FoG)] == u then
      • Custom script: set b = true
      • Custom script: endif
      • Custom script: set index = index + 1
      • Custom script: endloop
      • Custom script: endloop
      • Custom script: if b == false then
      • Custom script: set n = CreateUnit(p, udg_BT_Trap[i], x, y, 0.00)
      • Custom script: set udg_BT_Hero[GetUnitUserData(n)] = u
      • Custom script: set udg_BT_Count[id] = udg_BT_Count[id] + 1
      • Custom script: set n = null
      • Custom script: else
      • Custom script: call DisplayTextToPlayer(p, 0, 0 , udg_BT_StackMsg)
      • Custom script: call IssueImmediateOrder(u, "stop")
      • Custom script: endif
      • Custom script: call DestroyGroup(g)
      • Custom script: set g = null
      • Custom script: else
      • Custom script: call DisplayTextToPlayer(p, 0, 0 , udg_BT_MaxMsg)
      • Custom script: call IssueImmediateOrder(u, "stop")
      • Custom script: endif
      • Custom script: set u = null
      • Custom script: endif
  • Bear Trap Explode
    • Events
      • Unit - A unit dies
    • Conditions
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: local integer index = 1
      • Custom script: local integer i
      • Custom script: local integer ix
      • Custom script: local integer iy
      • Custom script: local real x
      • Custom script: local real y
      • Custom script: local unit FoG
      • Custom script: local group g
      • Custom script: local unit d
      • Custom script: loop
      • Custom script: if GetUnitTypeId(u) == udg_BT_Trap[index] then
      • Custom script: set ix = GetUnitUserData(u)
      • Custom script: set iy = GetUnitUserData(udg_BT_Hero[ix])
      • Custom script: set i = GetUnitAbilityLevel(udg_BT_Hero[ix], udg_BT_Ability)
      • Custom script: set x = GetUnitX(u)
      • Custom script: set y = GetUnitY(u)
      • Custom script: set d = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), udg_BT_Dummy, x, y, 0.00)
      • Custom script: set g = CreateGroup()
      • Custom script: set udg_BT_Count[iy] = udg_BT_Count[iy] - 1
      • Custom script: call UnitAddAbility(d, udg_BT_DummyAbility[i])
      • Custom script: call UnitApplyTimedLife(d, 'BTLF', 1.00)
      • Custom script: call GroupEnumUnitsInRange(g, x, y, udg_BT_AoE[i], null)
      • Custom script: loop
      • Custom script: set FoG = FirstOfGroup(g)
      • Custom script: exitwhen FoG == null
      • Custom script: call GroupRemoveUnit(g, FoG)
      • Custom script: if IsUnitEnemy(FoG, GetOwningPlayer(u)) then
      • Custom script: call UnitDamageTarget(u, FoG, udg_BT_Damage[i], true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
      • Custom script: call IssueTargetOrder(d, udg_BT_Order[i], FoG)
      • Custom script: endif
      • Custom script: endloop
      • Custom script: call DestroyGroup(g)
      • Custom script: set g = null
      • Custom script: set d = null
      • Custom script: break
      • Custom script: endif
      • Custom script: exitwhen index > udg_BT_MaxLevel
      • Custom script: set index = index + 1
      • Custom script: endloop
      • Custom script: set u = null
 

Attachments

  • BearTrap.w3x
    25.3 KB · Views: 64
Level 8
Joined
Jan 28, 2016
Messages
486
This is kinda awkward. I started making this yesterday and I got everything working except for the immobilisation part; I don't know how to trigger it exactly. At the moment it's MPI because I stuffed up the MUI version I was was trying to make but it should be fine if this is for an AoS map (even the ability Psionic Trap from DotA's Templar Assassin is MPI). Also planned to make a mini-game out of this once it was complete to showcase how the traps would work in the test map itself. It would've been a real crappy mini-game though! :p

Was going to ask you this morning if you wanted specific numbers or if you wanted to do that yourself. Either way I'll post what I have so far. Maybe GIMLI_2 has a solution for the "Trap Snare" trigger.

Also just a heads up; the vision can be triggered if needed but in the test map, the traps provide 400/400 vision which is set in the Object Editor.

Some questions
  • Do the traps only affect 1 unit (i.e.: the 1st unit to set it off)?
  • Do the traps have a duration or do they last indefinitely?
  • Can the traps be "sprung" manually by the player or do they only go off when stepped on?
  • Is the 350 AoE the range at which enemies will trigger a trap?
  • Are the traps meant to be selectable and can they be killed?
 

Attachments

  • [Test] Bear Trap!.w3x
    16.2 KB · Views: 44
Level 8
Joined
Jan 28, 2016
Messages
486
Damnit :D Now he has 2 solutions.

Mine is completely MUI. The maximum count as well as the "Trap Stack" restriction

Good things always come in pairs!! ;)

Neat. At least you got your's working unlike mine! I got lazy building this from scratch and resorted to how it was done in DotA. Odd thing is that all the units used in the triggered 'trap' spells have to be manually detonated and hence use a spell event to simply apply the effects (damage, slow, whatever). Therefore I had no template to go off to create a trigger to detect when an enemy sets off a trap.

Not sure if that made any sense. And yeah I was going to ask for details after I created the triggers so that if I needed to go back and edit anything, it wouldn't take too long. Probably should've said something earlier. That and I live on the opposite side of the world, so I thought I'd say something this morning after I touched up my triggers a bit only for you to get all done overnight lol!! Quite impressive actually.
 
Level 17
Joined
Mar 21, 2011
Messages
1,597
okay, thanks :)
it's working
great :)

i think that "it wouldn't break if the enemy still have the charm effect" thing is not necessary to be created. i think my friend able to configure it by himself. the most important things is it need to be GUI and MUI +leakless.
if you want to have this, you would need to trigger the explosion. Until now it has the basic land mine ability to explode if enemies get too close. I can add this if you want, just tell me ;)

EDIT: nvm, i think i misunderstood the ability
 
Last edited:

Deleted member 238226

D

Deleted member 238226

alright. it seems my friend choose you made gimli. and i also want to thank you dehua for his effort trying to helping me. i really appreciate that.
both of you will receive credits and 2 +REP

many thanks guys :)
 
Level 17
Joined
Mar 21, 2011
Messages
1,597
i just noticed that some of the globals will not be automatically created if you import my trigger due to custom script usage, for example BT_Count.
I should have created a variable creator trigger, just make sure all the variables are imported ;)
 
Status
Not open for further replies.
Top