HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Patrolling Units & Respawning

12-10-2002, 03:48 PM#1
Guest
Hey all, this is my first time posting here tho I've been reading posts here for a few weeks.
I've stumbled across a problem while working on my map.
The thing is all Neutral Hostiles in the map are set to respawn after 90seconds and at the spots they were triggered at. The catch is I have this particular portion of the map where I want units to spawn faster and randomly in the region.
A possible solution might be to give those units in that region a player group and thus make it possible to seperate them from their other fellow hostiles(hang in there) but the problem is all my player slots are filled(yes all 12) so I was wondering if there was a way to overcome this via a trigger or a variable?
My second problem regards making units patrol. I have an npc-only island with sentry posts and it would be more realistic to have those npc units patrol between guard towers, but I dont know how.
Oooo yes and one last thing, how do I get tooltips to work? I've made some custom units and labelled them accordingly in the ToolTip column in the unit editor but it doesnt show in-game. Am I missing that |r thingy? Frankly I dont know what the hell is that, can someone explain it to me?

Would appreciate any help at all thanks alot folks
12-10-2002, 04:52 PM#2
Jeltz
The |and numbers are used to hav colored txt.

For respawning numbers couldn't you just use a condition that tests if the unit is in the region or not?
12-11-2002, 05:26 AM#3
Guest
Oh crap silly me, thanks for pointing that out
I've also figured out the tooltips thingy already.

Now all I wanna know is how to get NPC units to patrol? Or even Neutral Hostiles?

Also isit possible to minus XP or money if a hero dies? I cant seem to find them, only Add Property
12-11-2002, 01:31 PM#4
DaKaN
Event Unit Dies

Condition Unit classification (unit is a hero)

Actions
Player Property : set player number of owner of dying unit's gold to Current gold - whatever

Hero Experience : current exp - whatever (note this might bring him down 1 lvl, i never actualy used it)
12-11-2002, 02:22 PM#5
Guest
Thanks Dakan but that only like sets the specific amount of money and xp he should have.
How do I MINUS it?
If I set amt of gold to 500 and he had 200 at the time of death then he would have gotten richer thru his death? :P
12-11-2002, 03:17 PM#6
Jeltz
Use arithmetic. If you want to remove 100.

Hero Experience : Set exp of (triggering unit) to ((current exp of (triggering unit)) - 100)

Do the same thing for money.
12-12-2002, 06:02 AM#7
Guest
I Thank Thee :D
12-12-2002, 03:06 PM#8
Krakou
To get NPC units to patrol create 2 regions near the towers and create a trigger.

Every x seconds
Unit order unit to move center of (region)
12-12-2002, 07:36 PM#9
DaKaN
heh sorry i forgot to say use Arthimatic, but i did put the - sign in :P

or u can pick every unit in region (owned by player or matching a condition) and order it to move to a random point in a region if you want it to aimlessly wander arround
12-12-2002, 07:46 PM#10
Guest
yeap thats what I've done, thanks for all the help guys