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

Help with this pls

Status
Not open for further replies.
Level 7
Joined
Feb 4, 2005
Messages
289
I want to make an Ensnare with some things:

1. Not to allow a unit, while ensnared, to attack because it does you know especially ranged units.

2. A bit harder: To make the ensnared unit together with the web to slide back to the caster. I say slide because with the trigger 'order unit' it goes instantly like teleport or starts walking before it is ensnared.

3. I have animation problem- i wanted to change the animation of the ensnare with the crypt fiend web but this web doesnt cover the whole unit. I think that these target attachement points do nothing to change the look of the buff.
 
Level 10
Joined
Jul 2, 2004
Messages
690
try making stun with the ensnare buff. that should prevent him from attacking and moving. then use triggers to move it towards the casting unit.
 
Level 7
Joined
Feb 4, 2005
Messages
289
Yes a stunning spell would work at least for the animation although the idea is to 'land; the air unit just like ensnare.

How to make it slide to the caster ,then, what looping action should i use and how ?


Instead of landing the air unit, how to make the hero attack air (he is Demon hunter) ONLY when he casts the spell and the creature is under the effect of the web ?
 
Level 7
Joined
May 16, 2004
Messages
355
For the slide do as the code below shows:
Code:
Slide Start
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Ensnare
    Actions
        Set Slider[1] = (Target unit of ability being cast)
        Set Slider[2] = (Casting unit)
        Trigger - Turn on Slide Movement <gen>
        Wait until ((Distance between (Position of Slider[1]) and (Position of Slider[2])) Less than or equal to 35.00), checking every 0.40 seconds
        Trigger - Turn off Slide Movement <gen>


Slide Movement
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit - Move Slider[1] instantly to ((Position of Slider[1]) offset by 4.00 towards (Distance between (Position of Slider[1]) and (Position of Slider[2])) degrees)
-------- Adjusting the distance moved allows you to change the speed of the slide. --------

Hope this helps you
 
Level 7
Joined
Feb 4, 2005
Messages
289
Chuckle Brother said:
For the slide do as the code below shows:
Code:
Slide Start
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Ensnare
    Actions
        Set Slider[1] = (Target unit of ability being cast)
        Set Slider[2] = (Casting unit)
        Trigger - Turn on Slide Movement <gen>
        Wait until ((Distance between (Position of Slider[1]) and (Position of Slider[2])) Less than or equal to 35.00), checking every 0.40 seconds
        Trigger - Turn off Slide Movement <gen>


Slide Movement
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Unit - Move Slider[1] instantly to ((Position of Slider[1]) offset by 4.00 towards (Distance between (Position of Slider[1]) and (Position of Slider[2])) degrees)
-------- Adjusting the distance moved allows you to change the speed of the slide. --------

Hope this helps you

This will certainly do but I have some questions. I created 2 variables with names Slide1 and Slide2. I didn't know what to select for 'type' and i chose unit, thus, i had the 'target unit of ablility being cast'. Is using UNIT for type ok and the fact that i did not select any values below the 'variable type'?

The reason why i still can't try it is that i don't know the path after Wait- Wait until condition checking every 0,40 seconds.
 
Level 7
Joined
Feb 4, 2005
Messages
289
There must be an error in my triggers. I'll just show you how it looks:

Trigger name:Green Web Slid
E: Unit - A unit Starts the effect of an ability
C: (Ability being cast) Equal to Green Web
A:
Set Slider1 = (Target unit of ability being cast)

You didnt tell me is there an error here in these Variables:

Edit Variables. There are no variables. Create new variable.
Variable name: Slider1
Variable type: Unit --- is this ok or should be ability etc?
Initial Value: None

Then I make it using this way:
Set Slider1 = (Target unit of ability being cast) -as in your text

Create New Variable. Name: Slider2
Variable Type: Unit
Initial Value: None

The trigger is:
Set Slider2 = (Casting unit) -as in your text

Are these variabls ok YES/NO ? If they are...

Trigger - Turn on Green Web Slide Movement <gen>

This is the name of the second trigger. SO for 'turn on' i selected the second trigger which starts Every 0.01 seconds... as event u know.






[/u]
 
Level 6
Joined
Dec 13, 2004
Messages
320
As far as I can tell yes those vars are good. If you want us to help you faster tell us what symptoms you are having. We'll be able to work out the problem and ultimatly fix it. l8r.
 
Level 7
Joined
Feb 4, 2005
Messages
289
Thanks but before i tell you the problem of the spell i should make sure everything in the triggers is correct. I can't find the wait until 'distance between... less or equal to '. Yes I know Wait for Condition but he didn't tell me what should i replace Conditionwith- Boolean Comparison or else and what exactly ...? The thing with the distance and Less or Eqaual to is not very c;ear for me.I don't know how to mkae that, i need full path for this trigger.
 
Level 6
Joined
Dec 13, 2004
Messages
320
It wasn't obivious that you didn't get the trigger entered yet. I think what he meant was:

Wait until (((Distance between (Position of Slider[1]) and (Position of Slider[2])) Less than or equal to 35.00) equal to true), checking every 0.40 seconds

So yes that would be Boolean.

For any problems like this I just try all the options, you know, trial and error. You might find a function that will come in handy later.
 
Level 7
Joined
Feb 4, 2005
Messages
289
So it's NOT Boolean. I found it- it is Real Comparison- edit the first part and add Math- Distance between points.

And i did eveyrhing- i had a lot of fun wuth the error in the spell: When you make use it the units starts moving chaotically or in distance with you just like magnets with opposite poles that repulse each other. LOL and if the unit dies his corpse starts moving in this chaotic motion :p

OK Mr Chuckle see how i did everything. My idea is that the unit starts moving towards the caster not away from him and not with him in a distance in an irregular orbit :D Corrections ?

If you know Pudge from Dota he grabs someone with the hook and pulls the unit - i want to make the webbed unit move towards the caster like that.


Triggers-
 
Level 6
Joined
Dec 13, 2004
Messages
320
Sorry about my mistake with the boolean thing, its been a while since I've done this.

As for the chaotic behaviour, I thought that would happen but I wanted to fix the problems one at a time so you wouldn't get confused. Change the '4.00' to '(Distance between (Position of Slider[1]) and (Position of Slider[2])) / x' where x is real and >10. This will make the ensnared unit slow down as he got closer to the caster, or you could leave the 4.00 there. If it's not smooth enough make the 4.00 smaller or x larger for which ever way you choose. If it's too slow increase the 'Every 0.01 seconds of game time'.

That's the offset done now as for the angle, ((facing of (Slider2)) + 180.00) degrees
 
Level 7
Joined
Feb 4, 2005
Messages
289
so i have to chnage this:
Unit - Move Slider1 instantly to ((Position of Slider1) offset by 2.00 towards (Distance between (Position of Slider1) and (Position of Slider2)) degrees)


Which part of that should i change to make this with the angle and pls give me that path to this.

And 1 question: when the unit starts moving it escapes from the web and the web is displayed although the unit moves-so- is there a way to make the unit move with its buff- the web?
 
Level 6
Joined
Dec 13, 2004
Messages
320
Yes that is diffinently the problem. You shouldn't have the distance part in the angle, change that to (Facing of (Slider 2)) and it will work.

What is this about path? Read my post carefully and ask me what it is you don't understand. I'm more than willing to help if I know how to help you.

As for the web how did you put it there? through triggers or spell?
 
Level 7
Joined
Feb 4, 2005
Messages
289
Well i sometimes need a lot of time to find 'distance between' or 'angle' i dont know if they are a math, X or Y postion, boolean cpmparison.. etc that's what i mean that sometimes i need the path to find the right trigger. Anyway, i did it in Slide mvmnt - i replaced distance between... with Unit - Move Slider1 instantly to ((Position of Slider1) offset by 2.00 towards (Facing of Slider2) degrees). Still no change - the problem from the very beginning of this thread is that the unit cannot move to the caster. You know - the unit is supposed to move to the caster in right direction not in chaotic and not to stay in distance like a magnet after having replaced the distance with facing.. . But Mr chuckle posted some 'Distance' in the Slide Start movement trigger too. Maybe this should be also changed?

As for the buff- i didnt use triggers but the buff from the ensnare- whataver i use even aerial shackles buff the ensnare is always displayed and stays when the unit starts sliding everywhere. (although i am waiting for a model to be made -if someone ever feels like making a green ensanre)
 
Status
Not open for further replies.
Top