• 🏆 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!

Starcraft spider mine ability + trigger help

Status
Not open for further replies.
Level 7
Joined
Jan 1, 2005
Messages
133
i know i have alrdy posted i think 2 threads about this but i need a new thread 4 this time becuz i have been able 2 b more specific with wat needs 2 happen in the ability process.

Basically wat i need is either an
- ability + a trigger
or an
- item + Ability + a trigger
that would appear on the unit (vulture) only afta i have research the upgrade for that ability.

At this point i have 2 different abilities, 1 uses the Ability + trigger Combination which goes as follows;

Trigger 1 (Init)
Event
unit finsihes training a unit
Condition
(Unit-type of (Trained unit)) Equal to unit (Vulture)
Event
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Researched tech-type) Equal to Spider Mines
Then - Actions
Unit - Add Spider Mines to (Trained unit)
Hero - Give (Last created item) to (Triggering unit)
Unit - Set Level of Spider Mines for (Trained unit) to 3
Else - Actions
Do nothing

Trigger 2 (Laying Down Mines)

Event
Unit - A unit Finishes casting an ability
Conditions
(Unit-type of (Casting unit)) Equal to unit (Vulture)
(Ability being cast) Equal to Spider Mines
Actions
Unit - Decrease Level of Spider Mines for (Casting unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Spider Mines for (Casting unit)) Equal to 1
Then - Actions
Unit - Remove Spider Mines from (Casting unit)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Level of Spider Mines for (Casting unit)) Equal to 2
(Level of Spider Mines for (Casting unit)) Equal to 3
Then - Actions
Unit - Decrease Level of Spider Mines for (Casting unit)
Else - Actions
Do nothing

Spider Mine Ability is a Hero Ability

Trigger created by IceWhiteDragon

The second Trigger uses the item + Ability + a trigger, but i was neva able 2 implenment completely, this is how it went;

Trigger 1 (init)
Was basically the same as the first 1 i post but instead it would give u 3 items into the units invertory and the ability 2 lay the mines to the unit

Trigger 2 (no mines left)
Events
Unit - A unit Uses an item
Conditions
(Item-type of (item)) Equal to Terran Spider Mine
Actions
and from there i had 2 make an action like if there were no items in the units invertory then remove the ability
Dr. Super God provided this trigger for me but i couldnt find the rite coding for wat he wanted me 2 input into the trigger. If there is a correct code i misunderstood could sum1 plz post the coding for me.

If any1 can help me to create a correct, working trigger that gives the mines to the unit afta the upgrade has been research plz post the trigger here. (GUI or JASS) thanx
 
Level 6
Joined
Sep 17, 2005
Messages
276
night_wolveX said:
Trigger 1 (Init)
Event
unit finsihes training a unit
Condition
(Unit-type of (Trained unit)) Equal to unit (Vulture)
Event
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Researched tech-type) Equal to Spider Mines
Then - Actions
Unit - Add Spider Mines to (Trained unit)
Hero - Give (Last created item) to (Triggering unit)
Unit - Set Level of Spider Mines for (Trained unit) to 3
Else - Actions
Do nothing


well this trigger says: if you have researched the upgrade at the time, when vulture is trained, then give mines. it doesnt check what happens after training. so if you finish upgrade after vulture is built, you wont get mines. you can add a function wait for condition (wait for upgrade is researched).


night_wolveX said:
Trigger 2 (Laying Down Mines)

Event
Unit - A unit Finishes casting an ability
Conditions
(Unit-type of (Casting unit)) Equal to unit (Vulture)
(Ability being cast) Equal to Spider Mines
Actions
Unit - Decrease Level of Spider Mines for (Casting unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Spider Mines for (Casting unit)) Equal to 1
Then - Actions
Unit - Remove Spider Mines from (Casting unit)
Else - Actions

>>>>1* Do nothing
>>>>2* If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Level of Spider Mines for (Casting unit)) Equal to 2
(Level of Spider Mines for (Casting unit)) Equal to 3
Then - Actions
Unit - Decrease Level of Spider Mines for (Casting unit)
Else - Actions
Do nothing

<<<<1* do nothing could cause problems
<<<<2* dont you use the decrease functions double? if i saw i right, you decreased the ability above in the else action. have a lookover and if it still doesnt work, post again. :wink:
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
Btw im interested in knowing how u did the spider mine seeking. When an enemy unit comes close to the mine it unburrows and seeks the unit and explodes, just like in starcraft.

Or did u just leave that out? Planting only normal wc3 mines where u need to step on them?
 
Level 7
Joined
Jan 1, 2005
Messages
133
Well ive made sum developments on the spider mine trigger, i figured out that o the spider mine ability yesterday i hadnt changed the independency to true so the tech-tree requirement would need to b researched first b4 using the ability. I was glad to get that work properly.

But i am still only getting 2 mines out of the ability b4 it is removed from the unit. I tried to increase the level of the ability but no difference. I also tried to modify the trigger slightly, with the multiply functions but no change either, if i move the level 1 function to after the level 2 and 3 the unit can lay as many mines as they want. can sum1 help me with getting a third mine out of this trigger plz.

Well Mini-me I have wanted to make the seeking property for the spider mines but dont know how to atm:(, so far wen a lay a mine down it becomes invisble and depending on the attack range of the mine will depend on wen it attacks a unit. I have also found sumtimes the unit can actually dodge the damage of the mine by changing direction just afta the mine has gone off. I think ill try and make it visble wen it gets in range of the mine if i can. If any1 else has ideas of how to achieve this plz post ur tips here thank you

night_wolveX
 
Status
Not open for further replies.
Top