Saturday, April 21, 2012

Creep help

Hello , its me gain!

I dont know if anyone saw this sometime but all the creep i spawn for my hero to kill just run away from him like cowards....i have put cant flee and attack is set i wonder what could be doing that....|||If you remove a units attack, and do not specifically order it to go to certain point, it will flee when attacked, cause it can't attack back.|||yeah i get what you are saying but i checked the attack and i did order an patrol move but still they flee.

Something i saw what that after hitting the boundaries i made they stop running and finaly fight back.

Its really weird to explain If needed i can try to upload my map or a video perhaps.|||Sure, be my guest, you can also mail it if you want to keep it personal to "Hemlockdevelopment@gmail.com"|||Their also the possiblity of giving the unit a attack of 0 damage, 100 cooldown, and the same range of the hero [so they keep the same space from each other] it'll keep them from attacking the only other problem is that, the hero will auto retaliate from being attacked, causing him to stop doing somthing less important in the eyes of warcraft. [normally this wont happen inless it's a very unimportant thing]|||@Hemlock Sry i was away , I sent it to you now so you may have a look if u have the time. I tryed putting path blocker and all but it didnt resolve the issue totaly

@doomfox hum but i want them to attack me no just stay with my hero :D|||Sorry for the somewhat late response, I've had a look at your map and what is causing the units to flee, is because of these two triggers.

Creep Blocking

and

Blocking

What you basically say with these triggers, that if your those spawned units attack your hero, they have to move to Mid CP.

What you want to do, is register your hero creation first, like so


Code:
Hero creation
Events
Unit - A unit Finishes training a unit
Conditions
(Unit-type of (Trained unit)) Equal to Vampire
Actions
Set Hero = (Trained unit)

Then accordingly adjust those two triggers, to leave the attacked hero out of the function like the following.


Code:
Creep Blocking
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 12 (Brown)
(Attacked unit) Not equal to Hero
Actions
Wait 0.50 seconds
Unit - Order (Attacking unit) to Move To (Center of Mid cp <gen>)

and


Code:
Blocking
Events
Unit - A unit Is attacked
Conditions
(Owner of (Attacking unit)) Equal to Player 12 (Brown)
(Attacked unit) Not equal to Hero
Actions
Wait 1.00 seconds
Unit - Order (Attacking unit) to Move To (Center of Mid cp <gen>)
|||wow thanks alot !! im gonna make the change

Thanks for your time.

Edit : There is still one thing itching me , it mite sound stupid but i dont know how to make my hero revivable from the hero altar i made maybe its a trigger ill check that .|||Sorry for double post im having trouble with the image im trying to show...but i finaly made it.. yay

Ive been messing around with the trigger and i am able to make my hero revive instantly like so:



but when i try to make it with a timer , it end up not reviving the hero :

|||Step1: Remove both the event and condition in your first trigger, and you don't need to turn off the "initially on" function.

step2: Remove the wait function and the "Countdown Timer - Destroy" function.

step3: Add the event function "Time - Timer Expires" in your first trigger, and add your made timer which you made in your second trigger.

and voila.

Now for a short note on what you did wrong here.

- You create a countdown timer, and then 15 seconds later you destroy it, use countdown timers over waits, for they are more accurate anyway.

- Countdown timers can be compared with those cliche timerbombs you see in movies, when it reaches 0.00 it will explode, so with this timer, you can let an event register what will happen when it reaches 0.00 (which are you actions in your first trigger if you add step3)|||EDIT : I got it now! thanks Hemlock great support.

I'd like to ask a last question , do you have an idea how to raise to hero lvl cap from 10 to X

X being the level wanted.|||Your welcome.

Make sure you go to "Advanced -> Gameplay Constants" to set the hero cap to be at least higher than you would like to set it with triggers.

Then for the triggers, there are a couple choices, but ill present you with the most logical one.


Code:
Setup trigger
Events
Map initialization
Conditions
Actions
Set X = 19

X is an integer variable and in this case set to 19, you can set this to the level.


Code:
Leveling cap
Events
Unit - A unit Gains a level
Conditions
(Level of (Leveling Hero)) Greater than or equal to X
Actions
Hero - Disable experience gain for (Leveling Hero)

If you want to make different level caps, for different units you might want to toy around a bit more with different values and unit variables.|||Nice !! thanks

No comments:

Post a Comment