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

[Solved] How do I make villagers not run away?

Status
Not open for further replies.

Roland

R

Roland

direct


#Simple
Just uncheck to make them Not flee and check them if they want too.
 

Ardenian

A

Ardenian

Is it possible to have a chance to avoid an attack smaller than 1%? 0.6% f.e.
With the default ? No.

But you can workaround it with triggering the evasion ability using a damage engine.
A bit is explained here: http://www.hiveworkshop.com/forums/world-editor-help-zone-98/single-target-evasion-grant-ability-272732/

You have to choose a range for the random unit bigger than 100, then you will have more.

1000 for example, if you do 'Random number between 1 and 1000' equal 1, then the chance will be 0,1%
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Level 21
Joined
Mar 27, 2012
Messages
3,232
Create a unit that has no model and no shadow. Make this unit cast the ability instead of the archmage. You can replace the ability on the arch with one that doesn't do anything.

EDIT: I think it's fine to ask stuff as long as it's not something trivial. Many techniques are just hacks, so there's no guarantee that there's a tutorial for everything.
 
Level 12
Joined
Jan 13, 2008
Messages
559
This makes sense. Thank you. ^^ yeah sorry for asking so much stuff but the last time I worked with the editor was a very long time ago. And I got another question aswell :p

I know I shouldn't use waits but what else do I use instead? I tried a timer but then I need a new trigger for each player because there is no condition such as "Expired Timer = Timer[2]". I was thinking to use a dummy that dies after x seconds but is there an easier way? I am trying to make a custom spell that is MUI compatible. Thank you
 
Level 12
Joined
Jan 13, 2008
Messages
559
Okay. This worked. I thought I need a trigger for each player but that's not the case.

Is it possible to change the max-life of a unit to a value x via trigger? I thought I could make it work this way: (but it adds it only once or it doesnt stack..dunno)

For x amount of times
-add ablity that increases hp by 1
 
Level 12
Joined
Jan 13, 2008
Messages
559
There's the ability Attribute Bonus already available which raises HP based on stats - you can fiddle around a bit with it.
Since it seems you want an ability to be able to do that...

I don't think this works since the summoned unit is not a hero. The only way it works is if I give the summoned unit 1000000000 life and then set it via trigger to x but that's not really what I want because it looks like the unit is about to die :/
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Your idea about adding an ability with 1 hp is the solution... but you first do that for all 1000s health, then for all 100s health, then 10s health and then 1s health.
That in order to keep the number of iterations below 40 instead of 9999.

This is included in BonusMod (which is really easy to find using that name in Google).
 
Level 12
Joined
Jan 13, 2008
Messages
559
i rather not create new posts for every little problem I have. I would like to keep the forum clean but if you want you can name this thread to "nordmar problem thread" :p

Your idea about adding an ability with 1 hp is the solution... but you first do that for all 1000s health, then for all 100s health, then 10s health and then 1s health.
That in order to keep the number of iterations below 40 instead of 9999.

This is included in BonusMod (which is really easy to find using that name in Google).

But the ability doesn't stack or it gets added once only. Am I missing smthg?

Code:
Call to Arms
    Events
        Unit - A unit Spawns a summoned unit
    Conditions
        (Unit-type of (Summoned unit)) Equal to Militia
    Actions
        For each (Integer A) from 1 to ((Integer((Life of (Summoning unit)))) - 1), do (Actions)
            Loop - Actions
                Unit - Add lifeBonus(+1)  to (Summoned unit)
 
Level 12
Joined
Jan 13, 2008
Messages
559
Alright. That works ;)
There is something weird happening. I am using JNGP 2.0 and I use imported models. Sometimes when I switch between 2 maps the models are not seenable in the editor and ingame and when I check the import manager the filesize is at 0. What kind of error is this and how do I fix it?

And how do I change the ability "channel" into an ability which is similiar to "Firebolt" or "Storm Bolt" ? I added a missile, a missile speed but when I cast the spell on a unit..nothing gets shot :/
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
And how do I change the ability "channel" into an ability which is similiar to "Firebolt" or "Storm Bolt" ? I added a missile, a missile speed but when I cast the spell on a unit..nothing gets shot :/

Stuff like that is hardcoded. If you want your ability to act like Firebolt or Storm Bolt, you will need to base the ability off those abilities, or trigger it.

Some of the Data Options you see in the Object Editor do not apply to the actual hardcoded spell.
 
Level 12
Joined
Jan 13, 2008
Messages
559
Stuff like that is hardcoded. If you want your ability to act like Firebolt or Storm Bolt, you will need to base the ability off those abilities, or trigger it.

Some of the Data Options you see in the Object Editor do not apply to the actual hardcoded spell.

Okay that's fine I guess. Do you know how to find out when a spell hit a unit?
The problem is that I am using a knockback ability and the unit should get knocked back when the spell hits it. But how do I check this? :/
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Okay that's fine I guess. Do you know how to find out when a spell hit a unit?
The problem is that I am using a knockback ability and the unit should get knocked back when the spell hits it. But how do I check this? :/

If the spell is homing, then just check the distance between the missle and the targeted unit. If it's a skillshot, then just use Unit Group - Pick every unit unit group and do (Actions) until it finds someone OR reaches the targeted point.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
and how do I check the distance between a missile and unit? I am using the ability storm bolt as base ability.

You can't base the missle off the hardcoded Storm Bolt and trigger the knockback alone. If you want to do it like that, you'll have to use a damage detection system that knows who and what specifically damaged the target so you can run the knockback system.

It's way easier to just trigger the missle for a homing missle, it would probably take you like 10 minutes at most.
 
Level 12
Joined
Jan 13, 2008
Messages
559
Okay I am sersly going crazy with this editor. All I need is an ability like Fire Bolt that won't stun. I can't remove the stun. If I use DeathCoil, I can't remove the DeathCoil graphic on the attacked unit.

I just wanna do this simple spell without triggering >_> Does a spell like this exist? I don't think so and it drives me crazy how limited the WE is.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Okay I am sersly going crazy with this editor. All I need is an ability like Fire Bolt that won't stun. I can't remove the stun. If I use DeathCoil, I can't remove the DeathCoil graphic on the attacked unit.

I just wanna do this simple spell without triggering >_> Does a spell like this exist? I don't think so and it drives me crazy how limited the WE is.

So what are you trying to do exactly? A skillshot that knocks hit units back?
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
No. This is another spell now. I just want to shoot something at an enemy and he takes damage. But no stun. Basically like Fire Bolt without the stun tho.

I don't know much about the limitations of object editor spells, but have you tried Shadow Strike? If that doesn't work, its extremely easy to trigger. It will probably take you 5-10 minutes to do it lol. I have to go to work in a bit, but I can make a template for you if you don't figure it out by the time I get back.
 

Ardenian

A

Ardenian

Holy Light is a missile, too. I am not sure whether one can tinker around with it to make it look like a bolt.

You could also try the Net ability ( though I think it is also auto-cast), or the Parasite ability.

Edit: You cannot remove an effect with the default, you have to replace it.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
without triggering
...
it drives me crazy how limited the WE is.

I apologize in the name of Blizzard that they didn't thought about people who are not smart enough to know that implementation of something can be done on a slightly 69,120 different ways at least and haven't made everything just like that.

On the other hand, it is not really smart to just say something doesn't exist because you haven't seen it yet.
Try "Acid Bomb".

Yup, it's called a Damage Detection System,.
This one does what you want: http://www.hiveworkshop.com/forums/spells-569/physical-damage-detection-gui-v1-3-0-0-a-231846/
Pay closer attention to what he asks.
And the condition asks which spell?
It is possible, but not on the fly.
Xonok has made a relatively easy implementation so you can still use the normal spells.
 
Level 12
Joined
Jan 13, 2008
Messages
559
I apologize in the name of Blizzard that they didn't thought about people who are not smart enough to know that implementation of something can be done on a slightly 69,120 different ways at least and haven't made everything just like that.

On the other hand, it is not really smart to just say something doesn't exist because you haven't seen it yet.
Try "Acid Bomb".


Pay closer attention to what he asks.

It is possible, but not on the fly.
Xonok has made a relatively easy implementation so you can still use the normal spells.

Thanks. And ye sorry...I was so mad that nothing worked. I had to release some of my anger ^^
 
Level 12
Joined
Jan 13, 2008
Messages
559
You better do that on another place than here... like throwing a grenade to your nieghbours house... that always does the trick for me.

thanks but I think this would be ... illegal? ^^
Do you have any idea why my imported models disappear in the editor?
I get that typical error <path>.mdl not found. The first time it works when I test it ingame but after closing and opening..it doesnt anymore. Is it a JNGP problem?

f.e. this model: http://www.hiveworkshop.com/forums/models-530/gondor-soldier-48616/?prev=search=gondor&d=list&r=20

And also: I made a custom spell based on "Shadow Strike" and I changed alot of its values. But when I use the ability ingame..the ability somehow keep being selected..like the spell is not finished for unlimied amount of time. How do I change this? I put the duration to 0 or 1 or 2..nothing changes
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Do you use local files?
If so, you also have to enable them in the editor.

The error basically appears when you are trying to load a resource from that path.
Try checking the import manager and compare the error to the path of your model.
If they are the same, try re-importing the model.
If they are different, try to find where you use that model in the (object)editor.
 
Level 12
Joined
Jan 13, 2008
Messages
559
Do you use local files?
If so, you also have to enable them in the editor.

The error basically appears when you are trying to load a resource from that path.
Try checking the import manager and compare the error to the path of your model.
If they are the same, try re-importing the model.
If they are different, try to find where you use that model in the (object)editor.

Oh...i didn't know that. Thanks. I deleted the ressources already. Do you have an answer to my other problem? And is it possible to check if an ability is on auto casting?
 
Last edited:
Level 37
Joined
Jul 22, 2015
Messages
3,485
okay thanks. That would be nice. Shadow Strike doesn't work aswell. It shows the effect of it even when you remove the effect in the editor. This makes me crazy :/

This is how the loop of a homing missle would look like.

  • Set tempLoc = (Position of missle)
  • Set aimLoc = (Position of target)
  • Set tempAngle = (Angle from tempLoc to aimLoc)
  • Set originLoc = (tempLoc offset by speed towards tempAngle degrees)
  • Set tempDistance = (Distance between originLoc and aimLoc)
  • -------- move missle to originLoc --------
  • Custom script: call RemoveLocation(udg_tempLoc)
  • Custom script: call RemoveLocation(udg_aimLoc)
  • Custom script: call RemoveLocation(udg_originLoc)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (target is dead) Equal to True
          • tempDistance Less than or equal to speed
    • Then - Actions
      • -------- damage target if they are alive --------
    • Else - Actions

If you wanted to add a knockback to this, you would just run the knockback system the same time you damage the unit.
 

sentrywiz

S

sentrywiz

@Nordmar

This thread has a million other questions that you "also wanted to know about". Your every reply is "oh and do you know..." "can you tell me how to..." etc.

Multiple threads will get your things answered concisely and on the point.

Also, it looks like you're making a map that you don't know how to do. Its good thing to ask and to learn, but to make something you really don't know how to make and asking a new question in every new reply kind of sucks. Where do you draw your motivation from? Its kind of obvious you want to copy stuff from other maps, which is okay. Just don't try too hard. You're getting in your way

Try to make a base map where everything works, even if its sub-par. Then you can improve it. And who knows, you might discover that you didn't really needed what you really thought you needed.

Lastly, here's a link to my creative tutorial / discussion. I advise to read it before you ask another question.

Simplicity vs Complexity
 
Level 12
Joined
Jan 13, 2008
Messages
559
@Nordmar

This thread has a million other questions that you "also wanted to know about". Your every reply is "oh and do you know..." "can you tell me how to..." etc.

Multiple threads will get your things answered concisely and on the point.

Also, it looks like you're making a map that you don't know how to do. Its good thing to ask and to learn, but to make something you really don't know how to make and asking a new question in every new reply kind of sucks. Where do you draw your motivation from? Its kind of obvious you want to copy stuff from other maps, which is okay. Just don't try too hard. You're getting in your way

Try to make a base map where everything works, even if its sub-par. Then you can improve it. And who knows, you might discover that you didn't really needed what you really thought you needed.

Lastly, here's a link to my creative tutorial / discussion. I advise to read it before you ask another question.

Simplicity vs Complexity

Thanks for the advice. I definitly do not copy from any map. I don't know what makes you think this.

And I don't see any problem asking multiple questions in this thread. I would like to keep the forum clean.

It's nice that you care but it's not needed. I ask realtively less questions compared the amount of work I put into my map. But thank you for your help so far. Due to the amount of questions I am asking it seems I don't try it myself first but I do..every single time. Just I work constantly on this map so the progress I am doing is quite fast.

cheers

no need to worry that things might get mixed up in this thread. I don't ask new questions when the old questions didn't get answered yet. I also made a note in my first post.
 
Okay -

never remove the initial question, even it is solved.
The thread is not yours, but public domain once the discussion runs.

Seconcly, this is not what I call a clean thread.
I don't appriciate it to start kind of any questions here and there just random in thread.
This is not organized at all.

If there is a small addition or anything else to the initial thread topic, then it's absolutly okay
and no one will punish you to asking this little extra.
But if you have just new and new questions.. once with coding, once about editor this is not okay.

So I hope everything is clear now.
 
Level 12
Joined
Jan 13, 2008
Messages
559
Okay -

never remove the initial question, even it is solved.
The thread is not yours, but public domain once the discussion runs.

Seconcly, this is not what I call a clean thread.
I don't appriciate it to start kind of any questions here and there just random in thread.
This is not organized at all.

If there is a small addition or anything else to the initial thread topic, then it's absolutly okay
and no one will punish you to asking this little extra.
But if you have just new and new questions.. once with coding, once about editor this is not okay.

So I hope everything is clear now.

It's amazing how everyone seems to be bothered that I ask multiple questions in 1 thread. But if it makes everyone happy I will keep updating the first post and link to the question post.

And I didn't remove the initial questions. The initial question is in the thread title. My first post simple said "is it possible?" :ogre_hurrhurr:

now everyone calm down. you ruin my question thread :ogre_datass:
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
Well, seeing how the title is stating "How do I make villagers not run away?" and the questions inside greatly vary from the original question, it's natural (to me) that people (like me) get confused.
Especially if it's ten or fifteen questions which aren't even remotely related to your initial issue you're asking in said thread...
What to do?
Ask a mod to change the title to something more fitting (*whistle*) like oh I dunno "Multiple questions about heroes, abilities and basic triggering"
 
Status
Not open for further replies.
Top